#_authenticated.tsx doesn't work.

12 messages · Page 1 of 1 (latest)

teal zenith
#

I have the code in the attached screenshot in an _authenticated.tsx file in the "routes" directory but nothing happens.

past ginkgo
#

do you have your routes in a _authenticated subfolder next to _authenticated.tsx?

teal zenith
#

No, _authenticated.tsx is in the root of the routes folder.

past ginkgo
#

then it won't work

teal zenith
#

Oh.

past ginkgo
#

routes need to be within the layout route

#

see this example

teal zenith
#

It doesn't say in the docs that I have to do that.

#

Thank you.

past ginkgo
#

this does use the flat syntax (_auth.invoices.tsx for example)

teal zenith
#

So I have to create an _auth.${route}.tsx for all routes?