Issue with routing
Answered
Xander posted this in #help-forum
XanderOP
I have the following structure:
Yet when going to
~/app/sounds/upload/{libraryId}/page.tsx
export default async function UploadPage({
params
}: {
params: {
libraryId: string
}
}) {
return (<p>{params.libraryId}</p>)
}
Yet when going to
/sounds/upload/1
in url bar I get a 404? Am I missing something?3 Replies
XanderOP
ffs it's [] not {}
Answer
@Xander I have the following structure:
`~/app/sounds/upload/{libraryId}/page.tsx`
tsx
export default async function UploadPage({
params
}: {
params: {
libraryId: string
}
}) {
return (<p>{params.libraryId}</p>)
}
Yet when going to `/sounds/upload/1` in url bar I get a 404? Am I missing something?
you need to rename your "libraryId" folder to
[libraryId]
@Xander ffs it's [] not {}
yea, this