This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import type { Metadata } from "next";
|
||||
import { CheckCircle2 } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { getLocale, getTranslations } from "next-intl/server";
|
||||
|
||||
import { Container } from "@/components/layout/container";
|
||||
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, getLocalizedPath, resolveLocale } from "@/lib/locale";
|
||||
import { getLocalizedPath, resolveLocale } from "@/lib/locale";
|
||||
import { AppCard } from "@/components/ui/app-card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { CardContent } from "@/components/ui/card";
|
||||
@@ -20,8 +20,9 @@ type SuccessPageProps = {
|
||||
};
|
||||
|
||||
export async function generateMetadata({ params }: SuccessPageProps): Promise<Metadata> {
|
||||
const { locale } = await params;
|
||||
const localeKey = resolveLocale(locale, FALLBACK_LOCALE);
|
||||
await params;
|
||||
const siteSettings = await getSiteSettings();
|
||||
const localeKey = resolveLocale(await getLocale().catch(() => siteSettings.defaultLocale), siteSettings.defaultLocale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "successPage" });
|
||||
|
||||
return await buildLocalizedMetadata({
|
||||
@@ -33,12 +34,10 @@ export async function generateMetadata({ params }: SuccessPageProps): Promise<Me
|
||||
}
|
||||
|
||||
export default async function SuccessPage({ params }: SuccessPageProps) {
|
||||
const { locale } = await params;
|
||||
const localeKey = resolveLocale(locale, FALLBACK_LOCALE);
|
||||
const [t, siteSettings] = await Promise.all([
|
||||
getTranslations({ locale: localeKey, namespace: "successPage" }),
|
||||
getSiteSettings(),
|
||||
]);
|
||||
await params;
|
||||
const siteSettings = await getSiteSettings();
|
||||
const localeKey = resolveLocale(await getLocale().catch(() => siteSettings.defaultLocale), siteSettings.defaultLocale);
|
||||
const t = await getTranslations({ locale: localeKey, namespace: "successPage" });
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user