chore: create a utils/languages file

This commit is contained in:
Chuma McPhoy
2024-07-04 15:19:17 +02:00
parent f89d17cd7f
commit bfcef5b832
12 changed files with 31 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
import { NextMiddleware, NextResponse } from "next/server"
import { findLang, Lang } from "./constants/languages"
import { Lang } from "./constants/languages"
import * as authRequired from "./middlewares/authRequired"
import * as bookingFlow from "./middlewares/bookingFlow"
import * as cmsContent from "./middlewares/cmsContent"
@@ -9,6 +9,7 @@ import * as currentWebLogout from "./middlewares/currentWebLogout"
import * as handleAuth from "./middlewares/handleAuth"
import * as myPages from "./middlewares/myPages"
import * as webView from "./middlewares/webView"
import { findLang } from "./utils/languages"
export const middleware: NextMiddleware = async (request, event) => {
const lang = findLang(request.nextUrl.pathname)