This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import type { Metadata } from "next";
|
||||
import { unstable_noStore as noStore } from "next/cache";
|
||||
import { Sparkles } from "lucide-react";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { getLocale, getTranslations } from "next-intl/server";
|
||||
|
||||
import { FloatingPreferences } from "@/components/layout/floating-preferences";
|
||||
import { MotionFade } from "@/components/motion-fade";
|
||||
import { HeroShell, HeroTitle } from "@/components/layout/site-hero";
|
||||
import { getSiteSettings } from "@/lib/app-config";
|
||||
import { buildLocalizedMetadata } from "@/lib/metadata";
|
||||
import { FALLBACK_LOCALE, resolveLocale } from "@/lib/locale";
|
||||
import { resolveLocale } from "@/lib/locale";
|
||||
|
||||
type ComingSoonPageProps = {
|
||||
params: Promise<{
|
||||
@@ -21,10 +21,10 @@ export const revalidate = 0;
|
||||
|
||||
export async function generateMetadata({ params }: ComingSoonPageProps): Promise<Metadata> {
|
||||
noStore();
|
||||
const { locale } = await params;
|
||||
const localeKey = resolveLocale(locale, FALLBACK_LOCALE);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "comingSoon" });
|
||||
await params;
|
||||
const siteSettings = await getSiteSettings();
|
||||
const localeKey = resolveLocale(await getLocale().catch(() => siteSettings.defaultLocale), siteSettings.defaultLocale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "comingSoon" });
|
||||
|
||||
return await buildLocalizedMetadata({
|
||||
locale: localeKey,
|
||||
@@ -39,12 +39,10 @@ export default async function ComingSoonPage({
|
||||
params,
|
||||
}: ComingSoonPageProps) {
|
||||
noStore();
|
||||
const { locale } = await params;
|
||||
const localeKey = resolveLocale(locale, FALLBACK_LOCALE);
|
||||
const [t, siteSettings] = await Promise.all([
|
||||
getTranslations({ locale: localeKey, namespace: "comingSoon" }),
|
||||
getSiteSettings(),
|
||||
]);
|
||||
await params;
|
||||
const siteSettings = await getSiteSettings();
|
||||
const localeKey = resolveLocale(await getLocale().catch(() => siteSettings.defaultLocale), siteSettings.defaultLocale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "comingSoon" });
|
||||
const isArabic = localeKey === "ar";
|
||||
const lines = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user