Fix dynamic default locale routing
This commit is contained in:
@@ -61,9 +61,10 @@ export async function generateMetadata({ params }: HomePageProps): Promise<Metad
|
||||
export default async function HomePage({ params }: HomePageProps) {
|
||||
const { locale } = await params;
|
||||
const localeKey = resolveLocale(locale);
|
||||
const [t, marqueeSettings] = await Promise.all([
|
||||
const [t, marqueeSettings, siteSettings] = await Promise.all([
|
||||
getTranslations({ locale: localeKey, namespace: "homepage" }),
|
||||
getMarqueeSettings(),
|
||||
getSiteSettings(),
|
||||
]);
|
||||
const serviceItems = [
|
||||
t("serviceBrand"),
|
||||
@@ -108,7 +109,7 @@ export default async function HomePage({ params }: HomePageProps) {
|
||||
</p>
|
||||
<div className="mt-8 flex flex-wrap gap-3">
|
||||
<Button asChild size="lg" className="min-w-[11rem]">
|
||||
<Link href={getLocalizedPath(localeKey, "/contact")}>
|
||||
<Link href={getLocalizedPath(localeKey, "/contact", siteSettings.defaultLocale)}>
|
||||
{t("servicesPrimaryCta")}
|
||||
<ArrowRight className="h-4 w-4" />
|
||||
</Link>
|
||||
@@ -119,7 +120,7 @@ export default async function HomePage({ params }: HomePageProps) {
|
||||
variant="outline"
|
||||
className="min-w-[11rem] border-border/80 bg-background/70 hover:bg-background"
|
||||
>
|
||||
<Link href={getLocalizedPath(localeKey, "/portfolio")}>
|
||||
<Link href={getLocalizedPath(localeKey, "/portfolio", siteSettings.defaultLocale)}>
|
||||
{t("servicesSecondaryCta")}
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user