Next.js Discord

Discord Forum

Parallel Routes in Dynamic Route returns 404

Unanswered
Maheśvara posted this in #help-forum
Open in Discord
I have a directory as shown.
In it, I basically have 2 parallel routes which I'm trying to use to display the required contents depending on authorized or not.

The layout does something like:

const Layout = async ({ params, children, idle, chatroom }: Props) => {
  ...

  return <>{children}{isPermitted ? chatroom : idle}</>;
};


When I try to navigate to the path /meeting/[meetingId] I always get a 404.
However, when logging the parallel routes, data is correctly being logged.

What's the reason for this and how can I solve it?

It also seems like all the parallel routes are being run even though I have them set to be conditionally rendered. Is this the correct behavior?

0 Replies