inside the modal (children) there is an id being rendered and i just added a form with a button whose action is a server action callback function that just redirects to the ‘/’ page , after that when i click on another parallel route , it doesnt render and just changes the url. Im stuck on it for hours now and i donot know how to fix that.
This is the page.tsx inside (.)photos[id]
` import { redirect } from ‘next/navigation’;
import { Modal } from ‘./modal’;
export default function PhotoModal({
params: { id: photoId },
}: {
params: { id: string };
}) {
return
<Modal>
<div>{photoId}</div>
<form action={async ()=>{
"use server";
redirect('/');
}}>
<button type="submit">Submit</button>
</form>
</Modal>;
}
`
Steps to recreate
https://github.com/vercel/nextgram
Just use Nextgram’s repo and change the page.tsx above
I was expecting it to open another modal after being redirected but it just changes the url