Right now, my routing looks like this:
https://app.com/users opens pages/users/index.js
https://app.com/users/:userid opens pages/users/[id].js
I want to create route, for example:
https://app.com/users/:id/friends -> show all friends for the user
or even
https://app.com/users/:id/friends/:friendId -> show a specific friend
I have tried
pages
users
index.js
[id].js
friends
index.js
[friendId].js
but i can only reach users/friends and not `users/:id/friends``
How do i set my pages directory so i can use this sort of routing?
Also, I want to be able to access id and friendId in the context of getServerSideProps...