after add new share toy, my toys page still not show the new toy
This commit is contained in:
parent
e6491b8440
commit
276db4fa31
|
|
@ -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
toyshare.db
BIN
toyshare.db
Binary file not shown.
BIN
toyshare.db-shm
BIN
toyshare.db-shm
Binary file not shown.
BIN
toyshare.db-wal
BIN
toyshare.db-wal
Binary file not shown.
Loading…
Reference in New Issue