12 lines
284 B
TypeScript
12 lines
284 B
TypeScript
import { headers } from "next/headers"
|
|
|
|
import { getLang } from "@/i18n/serverContext"
|
|
|
|
export async function getPathname() {
|
|
const headersList = await headers()
|
|
const lang = await getLang()
|
|
const pathname = headersList.get("x-pathname") || ""
|
|
|
|
return `/${lang}${pathname}`
|
|
}
|