Custom not-found.tsx not rendering
Unanswered
Chalcid wasp posted this in #help-forum
Chalcid waspOP
Structure:
Issue: Custom not-found.tsx isn't rendering when guidebook isn't found. Shows default Next.js 404 instead.
Any ideas what might be wrong?
app/(management)/guidebooks/[guidebookId]/
├─ layout.tsx - Calls notFound() when guidebook not found
├─ not-found.tsx - Custom 404 page
└─ cover/page.tsx
Issue: Custom not-found.tsx isn't rendering when guidebook isn't found. Shows default Next.js 404 instead.
Any ideas what might be wrong?
6 Replies
can you move your not-found page one layer up and check again?
Chalcid waspOP
Inside the
cover
folder you say? if so, already tried that, its stills show to default 404nah one layer up from the component that calls it. Also: add a page.tsx to your guidebookid-page
@Chalcid wasp solved?
Chalcid waspOP
Hey, sorry forgot to answer but couldn't fix so i just gave up on that, i will come back to it later
I just rebuild your project and it works fine: https://codesandbox.io/p/devbox/young-grass-vxx65n