after add new share toy, my toys page still not show the new toy

This commit is contained in:
Indigo Tang 2025-07-06 13:54:46 +00:00
parent e6491b8440
commit 276db4fa31
4 changed files with 2 additions and 2 deletions

View File

@ -55,11 +55,11 @@ export async function createOrUpdateToy(
savedToy = createToy(formData); savedToy = createToy(formData);
} }
// Revalidate paths to show the new data.
// This tells Next.js to re-fetch the data on the next request for these paths across all locales.
revalidatePath('/dashboard/my-toys'); revalidatePath('/dashboard/my-toys');
revalidatePath(`/toys/${savedToy.id}`); revalidatePath(`/toys/${savedToy.id}`);
revalidatePath('/'); revalidatePath('/');
revalidatePath(`/[locale]/toys/${savedToy.id}`, 'page');
revalidatePath(`/[locale]/dashboard/my-toys`, 'page');
return { return {

Binary file not shown.

Binary file not shown.

Binary file not shown.