mirror of
https://github.com/vercel/eve.git
synced 2026-09-20 05:35:39 +08:00
2f1bd95a3d
Signed-off-by: molebox <rich@vercel.com>
9 lines
280 B
TypeScript
9 lines
280 B
TypeScript
import { notFound } from "next/navigation";
|
|
import * as root from "next/root-params";
|
|
import { isSupportedLanguage } from "./languages";
|
|
|
|
export const getRootLang = async () => {
|
|
const lang = await root.lang();
|
|
return lang && isSupportedLanguage(lang) ? lang : notFound();
|
|
};
|