Initial commit: fristy.net personal site
Build & Push / Lint & Build (push) Successful in 1m14s
Build & Push / Build & Push Image (push) Canceled after 1m36s

This commit is contained in:
fristy committed 2026-09-10 04:54:34 +03:00
commit eb20d470e0
51 files changed
+6052

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
"use server";
import { cookies } from "next/headers";
import { LOCALE_COOKIE, isLocale, type Locale } from "./locales";
export async function setLocaleCookie(locale: Locale): Promise<void> {
if (!isLocale(locale)) {
return;
}
const store = await cookies();
store.set(LOCALE_COOKIE, locale, {
path: "/",
maxAge: 60 * 60 * 24 * 365,
sameSite: "lax",
});
}