form action redirects user to tjhe appropriate year

This commit is contained in:
2024-01-17 15:47:55 +01:00
parent 119d64344f
commit 0eb11e7d02
18 changed files with 158 additions and 86 deletions

View 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);
}