fix: toggle section accordion open

This commit is contained in:
Christel Westerberg
2024-10-03 17:00:04 +02:00
parent 1bb2d3f687
commit 668eedd837
12 changed files with 245 additions and 289 deletions

View File

@@ -14,19 +14,8 @@ import type { MiddlewareMatcher } from "@/types/middleware"
export const middleware: NextMiddleware = async (request) => {
const { nextUrl } = request
const lang = findLang(nextUrl.pathname)!
const pathWithoutTrailingSlash = removeTrailingSlash(nextUrl.pathname)
const pathNameWithoutLang = pathWithoutTrailingSlash.replace(`/${lang}`, "")
const { contentType, uid } = await resolveEntry(pathNameWithoutLang, lang)
const headers = getDefaultRequestHeaders(request)
if (uid) {
headers.set("x-uid", uid)
}
if (contentType) {
headers.set("x-contenttype", contentType)
}
return NextResponse.next({
request: {
headers,