after add new share toy, my toys page still not show the new toy
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user