subman-nextjs/src/app/login/revalidate.ts

12 lines
220 B
TypeScript
Raw Normal View History

2024-09-18 09:56:08 +00:00
"use server"
import { revalidatePath } from "next/cache"
export default async function revalidate(path: string) {
try {
revalidatePath(path)
return true
} catch (error) {
console.error(error)
return false
}
}