SolidJSS
SolidJS2y ago
16 replies
Vexcited

using id on route and named route breaks

Hello !

I experience an issue with my router where the /:id/@me/ route gets ignored and only the /:id/:guild_id/ route gets mounted when I navigate to http://localhost:1420/123456789123456789/@me (as example)

<Router>
  <Route path="/" component={AuthView} />
  <Route path="/:id" component={AccountLayout}>
    <Route path="/@me" component={PrivateDMLayout}>
      <Route path="/" component={() => <p>Hello World</p>} />
      <Route path="/friends" component={FriendsView} />
      <Route path="/:channel_id" component={ChannelView} />
    </Route>

    <Route path="/:guild_id" component={GuildLayout}>
      <Route path="/:channel_id" component={ChannelView} />
      <Route path="/" component={Account404} />
    </Route>
  </Route>
</Router>


Any idea why it doesn't work ? I couldn't find anything in the documentation related to my case and I'm kinda lost to be honest.

Thanks you in advance !
Was this page helpful?