update: as-nned URL prefix for i18n routing
This commit is contained in:
parent
44bc99dd9d
commit
d0d9c21aba
@ -15,7 +15,7 @@ import { SearchIcon } from "@/components/icons/SearchIcon";
|
|||||||
import { InfoIcon } from "@/components/icons/InfoIcon";
|
import { InfoIcon } from "@/components/icons/InfoIcon";
|
||||||
import { HomeIcon } from "@/components/icons/HomeIcon";
|
import { HomeIcon } from "@/components/icons/HomeIcon";
|
||||||
import { TextButton } from "@/components/ui/Buttons/TextButton";
|
import { TextButton } from "@/components/ui/Buttons/TextButton";
|
||||||
import Link from "next/link";
|
import { Link } from "@/i18n/navigation";
|
||||||
|
|
||||||
export const HeaderDestop = () => {
|
export const HeaderDestop = () => {
|
||||||
return (
|
return (
|
||||||
@ -101,14 +101,14 @@ export const HeaderMobile = () => {
|
|||||||
)}
|
)}
|
||||||
{!showsearchBox && (
|
{!showsearchBox && (
|
||||||
<div className="absolute left-1/2 -translate-x-1/2 -translate-y-0.5 inline-flex h-full items-center">
|
<div className="absolute left-1/2 -translate-x-1/2 -translate-y-0.5 inline-flex h-full items-center">
|
||||||
<a href="/">
|
<Link href="/">
|
||||||
<DarkModeImage
|
<DarkModeImage
|
||||||
lightSrc={LogoMobileLight}
|
lightSrc={LogoMobileLight}
|
||||||
darkSrc={LogoMobileDark}
|
darkSrc={LogoMobileDark}
|
||||||
alt="Logo"
|
alt="Logo"
|
||||||
className="w-24 h-8 translate-y-[2px]"
|
className="w-24 h-8 translate-y-[2px]"
|
||||||
/>
|
/>
|
||||||
</a>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showsearchBox && <SearchBox close={() => setShowsearchBox(false)} />}
|
{showsearchBox && <SearchBox close={() => setShowsearchBox(false)} />}
|
||||||
|
@ -5,5 +5,7 @@ export const routing = defineRouting({
|
|||||||
locales: ["en", "zh"],
|
locales: ["en", "zh"],
|
||||||
|
|
||||||
// Used when no locale matches
|
// Used when no locale matches
|
||||||
defaultLocale: "zh"
|
defaultLocale: "zh",
|
||||||
|
|
||||||
|
localePrefix: "as-needed"
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user