Initial commit: fristy.net personal site
Build & Push / Build & Push Image (push) Canceled after 0s
Build & Push / Lint & Build (push) Canceled after 41s

This commit is contained in:
fristy committed 2026-09-10 04:23:21 +03:00
commit 03b00358c0
56 files changed
+6038

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { cookies } from "next/headers";
import { DEFAULT_LOCALE, LOCALE_COOKIE, isLocale, type Locale } from "./locales";
export async function getLocale(): Promise<Locale> {
const store = await cookies();
const raw = store.get(LOCALE_COOKIE)?.value;
if (raw && isLocale(raw)) {
return raw;
}
return DEFAULT_LOCALE;
}