From 14145c85b8127a35a7c6f73b4163deb89d636fa2 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Thu, 14 Sep 2023 21:36:39 +0200 Subject: [PATCH] Remove unused file (#55378) While looking into `setLazyProp` noticed that this file is not being used. --- .../next/src/shared/lib/i18n/detect-locale-cookie.ts | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 packages/next/src/shared/lib/i18n/detect-locale-cookie.ts diff --git a/packages/next/src/shared/lib/i18n/detect-locale-cookie.ts b/packages/next/src/shared/lib/i18n/detect-locale-cookie.ts deleted file mode 100644 index 9089f438eb0d0..0000000000000 --- a/packages/next/src/shared/lib/i18n/detect-locale-cookie.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IncomingMessage } from 'http' - -export function detectLocaleCookie(req: IncomingMessage, locales: string[]) { - const { NEXT_LOCALE } = (req as any).cookies || {} - return NEXT_LOCALE - ? locales.find( - (locale: string) => NEXT_LOCALE.toLowerCase() === locale.toLowerCase() - ) - : undefined -}