mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
11 lines
231 B
TypeScript
11 lines
231 B
TypeScript
'use server'
|
|
|
|
import { revalidatePath } from 'next/cache'
|
|
|
|
export async function doAction() {
|
|
revalidatePath('/en/photos/1/view')
|
|
// sleep 1s
|
|
await new Promise((resolve) => setTimeout(resolve, 1000))
|
|
return Math.random()
|
|
}
|