fix: return baseUrls if no uid is given to language switcher query
This commit is contained in:
@@ -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} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user