not-found.tsx in Optional Catch-all segments
Unanswered
Yakutian Laika posted this in #help-forum
Yakutian LaikaOP
I have a Next.js v14.2 project with an optional catch-all route
Do optional catch-all segments do not accept not-found.tsx file and the file has to be created in the parent directory?
[[...slug]]. In this page I make a fetch request and if there's no content I run the notFound function. The thing is that inside this folder I created the not-found.tsx file with the 404 error I want to display, but when the notFound function is executed I get the 404 default page (the next.js 404 page).Do optional catch-all segments do not accept not-found.tsx file and the file has to be created in the parent directory?