fix: return baseUrls if no uid is given to language switcher query

This commit is contained in:
Christel Westerberg
2024-06-11 16:53:42 +02:00
parent e622be7c86
commit 16ee1bf493
22 changed files with 69 additions and 88 deletions

View File

@@ -1,12 +1,13 @@
import { headers } from "next/headers"
"use client"
import { Lang } from "@/constants/languages"
import { useParams } from "next/navigation"
import NotFound from "@/components/Current/NotFound"
import { LangParams } from "@/types/params"
export default function NotFoundPage() {
const headersList = headers()
const lang = headersList.get("x-sh-language") as Lang
const { lang } = useParams<LangParams>()
return <NotFound lang={lang} />
}