This commit is contained in:
@@ -21,7 +21,7 @@ export async function generateMetadata({
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "aboutPage" });
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/about",
|
||||
title: t("title"),
|
||||
|
||||
@@ -26,7 +26,7 @@ export async function generateMetadata({
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "contactPage" });
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/contact",
|
||||
title: t("title"),
|
||||
|
||||
@@ -11,6 +11,7 @@ import { getTranslations } from "next-intl/server";
|
||||
|
||||
import { Container } from "@/components/layout/container";
|
||||
import { MotionFade } from "@/components/motion-fade";
|
||||
import { getSiteSettings } from "@/lib/app-config";
|
||||
import { buildLocalizedMetadata } from "@/lib/metadata";
|
||||
import { AppCard } from "@/components/ui/app-card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -34,13 +35,17 @@ export async function generateMetadata({
|
||||
params: { locale },
|
||||
}: HomePageProps): Promise<Metadata> {
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "homepage" });
|
||||
const [t, siteSettings] = await Promise.all([
|
||||
getTranslations({ locale: localeKey, namespace: "homepage" }),
|
||||
getSiteSettings(),
|
||||
]);
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/",
|
||||
title: t("heroTitle"),
|
||||
title: siteSettings.locales[localeKey].siteName,
|
||||
description: t("heroText"),
|
||||
applyTitleTemplate: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ export async function generateMetadata({
|
||||
const item = await getPublishedPortfolioProjectBySlug(slug);
|
||||
|
||||
if (!item) {
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: `/portfolio/${slug}`,
|
||||
title: "Portfolio",
|
||||
@@ -66,7 +66,7 @@ export async function generateMetadata({
|
||||
});
|
||||
}
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: `/portfolio/${slug}`,
|
||||
title: getLocalizedValue(item.title, localeKey),
|
||||
|
||||
@@ -32,7 +32,7 @@ export async function generateMetadata({
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "portfolioPage" });
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/portfolio",
|
||||
title: t("title"),
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function generateMetadata({
|
||||
const item = getProductItem(slug);
|
||||
|
||||
if (!item) {
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: `/products/${slug}`,
|
||||
title: "Products",
|
||||
@@ -45,7 +45,7 @@ export async function generateMetadata({
|
||||
});
|
||||
}
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: `/products/${slug}`,
|
||||
title: pickText(item.name, localeKey),
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function generateMetadata({
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "productsPage" });
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/products",
|
||||
title: t("title"),
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function generateMetadata({
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "successPage" });
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/success",
|
||||
title: t("title"),
|
||||
|
||||
@@ -25,7 +25,7 @@ export async function generateMetadata({
|
||||
const localeKey = resolveLocale(locale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "comingSoon" });
|
||||
|
||||
return buildLocalizedMetadata({
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
pathname: "/coming-soon",
|
||||
title: `${t("badge")} | moh-sass`,
|
||||
|
||||
Reference in New Issue
Block a user