Next.js Discord

Discord Forum

[Next.js 13] useSelectedLayoutSegment returns route group `(projects)` instead of route `project-1`

Answered
Siamese posted this in #help-forum
Open in Discord
SiameseOP
Answered by alfon
i just work around this and use useSelectedLayoutSegments()[1] to get the next segment if the first one is a group
View full answer

4 Replies

SiameseOP
up
i just work around this and use useSelectedLayoutSegments()[1] to get the next segment if the first one is a group
Answer
SiameseOP
ohhhh i didnt think about that
thanks!