feat: Wabenhain Honig-Shop Anwendung
Vollstaendige Next.js/Prisma-E-Commerce-Anwendung fuer eine Imkerei: Shop, Warenkorb, Stripe-Checkout, Kundenkonto mit 2FA, Admin-Bereich (Produkte, Ernten, Chargen, Bestellungen, Gutscheine, admin-editierbare Website-Inhalte), i18n (DE/EN), Rate-Limiting/CSP/Audit-Log-Haertung, PostgreSQL- und MySQL-Unterstuetzung ueber austauschbare Prisma- Treiber-Adapter, Unit-/Komponenten-/E2E-Tests.
This commit is contained in:
1 parent
5c76fcc266
commit
c7927f2883
240 files changed
+26096
-137
No files matched your search
@@ -0,0 +1,57 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Container, SectionHeading, LinkButton } from "@/components/ui";
|
||||
import { getLocale } from "@/i18n/locale";
|
||||
import { getDictionary } from "@/i18n/get-dictionary";
|
||||
import { NEWSLETTER_DISCOUNT_CODE, NEWSLETTER_DISCOUNT_PERCENT } from "@/lib/newsletter-discount";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Erntepost bestätigt",
|
||||
alternates: { canonical: "/newsletter-bestaetigt" },
|
||||
robots: { index: false },
|
||||
};
|
||||
|
||||
export default async function NewsletterBestaetigtPage(props: PageProps<"/newsletter-bestaetigt">) {
|
||||
const t = getDictionary(await getLocale());
|
||||
const { status } = await props.searchParams;
|
||||
const title =
|
||||
status === "invalid"
|
||||
? t.newsletterBestaetigtPage.invalidTitle
|
||||
: status === "unsubscribed"
|
||||
? t.newsletterBestaetigtPage.unsubscribedTitle
|
||||
: t.newsletterBestaetigtPage.confirmedTitle;
|
||||
const text =
|
||||
status === "invalid"
|
||||
? t.newsletterBestaetigtPage.invalidText
|
||||
: status === "unsubscribed"
|
||||
? t.newsletterBestaetigtPage.unsubscribedText
|
||||
: t.newsletterBestaetigtPage.confirmedText;
|
||||
|
||||
return (
|
||||
<div className="py-24">
|
||||
<Container className="max-w-xl text-center">
|
||||
<SectionHeading
|
||||
eyebrow={t.newsletterBestaetigtPage.eyebrow}
|
||||
title={title}
|
||||
align="center"
|
||||
className="mx-auto"
|
||||
/>
|
||||
<p className="mt-6 text-ink/70">{text}</p>
|
||||
|
||||
{status === "ok" ? (
|
||||
<div className="mt-8 border border-forest/20 bg-forest/5 p-6">
|
||||
<p className="text-sm text-ink/70">{t.newsletterBestaetigtPage.discountHeading}</p>
|
||||
<p className="mt-2 text-2xl text-forest tracking-wide">
|
||||
{t.newsletterBestaetigtPage.discountText(NEWSLETTER_DISCOUNT_PERCENT)}{" "}
|
||||
<span className="font-medium">{NEWSLETTER_DISCOUNT_CODE}</span>
|
||||
</p>
|
||||
<p className="mt-2 text-xs text-ink/50">{t.newsletterBestaetigtPage.discountCopyHint}</p>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<LinkButton href="/" className="mt-8">
|
||||
{t.newsletterBestaetigtPage.backHome}
|
||||
</LinkButton>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user