T
TanStack3mo ago
wee-brown

Layouts and Pathless Routes

Tried to read the docs for multiple times but cant seem to figure out a "perfect" way to do what i want with file + flat router structure ( in the image attached ) Probably a router question move if this is not the right fit here - So i want a pathless _dashboard to gate all the auth stuff and show the actual "private" layout, all good here. - Then i want bookmarks to be the index, that lists all the items. - After i want bookmarks/create or bookmarks/$id to open as a overlay of the index. On the client i can open this correctly and does what i need, but when doing SSR it pushes me back to bookmarks with no redirects :p pretty weird. Tried also:
_dashboard
-- bookmarks.tsx
-- bookmarks.$id.tsx
-- bookmarks.create.tsx
_dashboard
-- bookmarks.tsx
-- bookmarks.$id.tsx
-- bookmarks.create.tsx
Any help is appreciated how to make this in a clean way :p
No description
4 Replies
exotic-emerald
exotic-emerald3mo ago
How is the navigation done? (Modal opening)
wee-brown
wee-brownOP3mo ago
Just a link component
useful-bronze
useful-bronze3mo ago
modals are not well supported at the moment with routes this will be much easier once we have parallel routes right now I would render the modal depending on a search param
wee-brown
wee-brownOP3mo ago
i temporary worked around with:
No description

Did you find this page helpful?