parallel route doesn't navigate back properly
Unanswered
Alligator mississippiensis posted this in #help-forum
Alligator mississippiensisOP
I'm having a really strange issue in my nextjs 15 application:
I have a
the modals are at
the problem is:
when I close these modals in a production environment, it goes to a clientside error page instead of opening it
if I try opening it in the development server of npm run dev it works normally
in this
you can see that I use
what might be happening?
I also attached a print with the error screen and my console error
my
I have a
@modal
parallel route for displaying modals in my application, like in the print attachedthe modals are at
/app/track/suspensions/@modal/flasks/add/page.tsx
and /app/track/suspensions/@modal/batches/add/page.tsx
the problem is:
when I close these modals in a production environment, it goes to a clientside error page instead of opening it
if I try opening it in the development server of npm run dev it works normally
in this
page.tsx
file that I'm sharing goes the add batch form modalyou can see that I use
router.back()
to returnwhat might be happening?
I also attached a print with the error screen and my console error
my
default.tsx
is empty like this:export default function Default() {
return null;
}
1 Reply
Alligator mississippiensisOP
also my
layout.tsx
inside /suspensions
is pretty simpleimport { ReactNode } from 'react';
export default function TrackSuspensionsLayout({
children,
modal, // ← the “@modal” parallel‐route slot
}: {
children: ReactNode;
modal: ReactNode;
}) {
return (
<>
{modal}
{children}
</>
);
}