Merged in feat/refactor-header-footer-sitewidealert (pull request #1374)

Refactor: removed parallel routes for header, footer and sidewidealert. Langswitcher and sidewidealert now client components

* feat - removed parallel routes and made sidepeek and sitewidealerts as client components

* Langswitcher as client component

* Fixed lang switcher for current header

* Passing lang when fetching siteconfig

* Merge branch 'master' into feat/refactor-header-footer-sitewidealert

* Refactor

* Removed dead code

* Show only languages that has translation

* Refetch sitewidealert every 60 seconds

* Merge branch 'master' into feat/refactor-header-footer-sitewidealert

* Removed sidepeek parallel route from my-stay

* Added missing env.var to env.test

* Removed console.log


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-02-19 08:59:24 +00:00
parent c2b7d97ddd
commit 7c0f9084b6
45 changed files with 664 additions and 697 deletions

View File

@@ -1,4 +1,4 @@
import { NextResponse } from "next/server"
import { type NextMiddleware,NextResponse } from "next/server"
import {
myPages,
@@ -6,15 +6,13 @@ import {
profile,
profileEdit,
} from "@/constants/routes/myPages"
import { env } from "@/env/server"
import { internalServerError, notFound } from "@/server/errors/next"
import { notFound } from "@/server/errors/next"
import { getPublicNextURL } from "@/server/utils"
import { fetchAndCacheEntry } from "@/services/cms/fetchAndCacheEntry"
import { findLang } from "@/utils/languages"
import { fetchAndCacheEntry, getDefaultRequestHeaders } from "./utils"
import type { NextMiddleware } from "next/server"
import { getDefaultRequestHeaders } from "./utils"
import type { MiddlewareMatcher } from "@/types/middleware"