Refactor shared hero structure
This commit is contained in:
@@ -5,6 +5,7 @@ import { 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 { buildLocalizedMetadata } from "@/lib/metadata";
|
||||
import { getLocalizedPath, resolveLocale } from "@/lib/locale";
|
||||
import { AppCard } from "@/components/ui/app-card";
|
||||
@@ -37,32 +38,28 @@ export default async function SuccessPage({ params: { locale } }: SuccessPagePro
|
||||
|
||||
return (
|
||||
<>
|
||||
<section className="hero-surface hero-page relative isolate overflow-hidden pb-12 pt-24 sm:pt-28 lg:pb-16 lg:pt-32">
|
||||
<Container size="narrow" className="text-center">
|
||||
<MotionFade className="w-full">
|
||||
<div className="mx-auto flex max-w-[42rem] flex-col items-center">
|
||||
<CheckCircle2 className="h-14 w-14 text-status-success" />
|
||||
<p className="mt-5 text-sm font-medium tracking-[-0.02em] text-foreground/58">
|
||||
{t("title")}
|
||||
</p>
|
||||
<h1 className="mt-4 text-balance text-4xl font-semibold leading-[0.9] tracking-[-0.07em] text-foreground sm:text-5xl lg:text-[4.5rem]">
|
||||
{t("title")}
|
||||
</h1>
|
||||
<p className="mx-auto mt-5 max-w-[32rem] text-sm leading-6 text-foreground/64 sm:text-base">
|
||||
{t("text")}
|
||||
</p>
|
||||
<div className="mt-8 flex flex-wrap items-center justify-center gap-3">
|
||||
<Button asChild>
|
||||
<Link href={getLocalizedPath(localeKey)}>{t("home")}</Link>
|
||||
</Button>
|
||||
<Button asChild variant="outline">
|
||||
<Link href={getLocalizedPath(localeKey, "/contact")}>{t("contact")}</Link>
|
||||
</Button>
|
||||
</div>
|
||||
<HeroShell compactBackdrop size="narrow" variant="page">
|
||||
<MotionFade className="w-full">
|
||||
<div className="mx-auto flex max-w-[42rem] flex-col items-center">
|
||||
<CheckCircle2 className="h-14 w-14 text-status-success" />
|
||||
<p className="mt-5 text-sm font-medium tracking-[0.12em] text-foreground/56">
|
||||
{t("title")}
|
||||
</p>
|
||||
<HeroTitle lines={[{ text: t("title") }]} variant="page" />
|
||||
<p className="mx-auto mt-5 max-w-[32rem] text-sm leading-7 text-foreground/64 sm:text-base">
|
||||
{t("text")}
|
||||
</p>
|
||||
<div className="mt-8 flex flex-wrap items-center justify-center gap-3">
|
||||
<Button asChild>
|
||||
<Link href={getLocalizedPath(localeKey)}>{t("home")}</Link>
|
||||
</Button>
|
||||
<Button asChild variant="outline">
|
||||
<Link href={getLocalizedPath(localeKey, "/contact")}>{t("contact")}</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</MotionFade>
|
||||
</Container>
|
||||
</section>
|
||||
</div>
|
||||
</MotionFade>
|
||||
</HeroShell>
|
||||
|
||||
<Container size="narrow" className="pb-12 lg:pb-16">
|
||||
<MotionFade className="w-full" delay={0.06}>
|
||||
|
||||
Reference in New Issue
Block a user