form action redirects user to tjhe appropriate year
This commit is contained in:
9
app/lib/actions/navigationActions.ts
Normal file
9
app/lib/actions/navigationActions.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
'use server';
|
||||
|
||||
import { revalidatePath } from "next/cache";
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
export async function gotoHome(path: string = '/') {
|
||||
revalidatePath(path, "page");
|
||||
redirect(path);
|
||||
}
|
||||
Reference in New Issue
Block a user