Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 | 44x 44x 44x 2x | import { LOCALE_COOKIE } from "./constants"; import { takeCookie } from "./cookies"; import { isLocale, Locale } from "./locale"; import { ServerApiContext } from "types/serverContext"; export function getValidCookieLocale(context: ServerApiContext): Locale | null { const localeCookie = takeCookie(LOCALE_COOKIE, context); Iif (localeCookie && isLocale(localeCookie)) return localeCookie; return null; } |