Next.js Discord

Discord Forum

`revalidatePath` with @parallelRoutes and dynamic [params]?

Unanswered
Riday 💙 posted this in #help-forum
Open in Discord
How do I revalidate a path when I am using parallel routes?
File to revalidate: dashboard >@admin > users > [username] > page.tsx (no layout file)
Actual path: /dashboard/users/ridays2001
I tried
- revalidatePath('/dashboard/users/ridays2001', 'page' & 'layout')
- revalidatePath('/dashbord/@admin/users/[username]/page', 'page' & 'layout')

3 Replies

I tried several combinations around this and none of them seem to work
I am revalidating the path inside a server action
Also, I am calling the server action like this:
'use client';
// ... other code
<Button
  onClick={async () => {
    await myAction(param)
      .then(toast.success)
      .catch(toast.error);
  }}
/>

Could this be an issue?