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,47 @@
|
||||
import type { Metadata } from "next";
|
||||
import { LegalPage } from "@/components/legal-page";
|
||||
import { getShippingTiers } from "@/lib/shipping";
|
||||
import { formatPrice } from "@/lib/format";
|
||||
import { getLocale } from "@/i18n/locale";
|
||||
import { getDictionary } from "@/i18n/get-dictionary";
|
||||
|
||||
export const metadata: Metadata = { title: "Versand und Zahlung", alternates: { canonical: "/versand-zahlung" } };
|
||||
|
||||
// Versandstaffeln koennen sich im Admin-Bereich jederzeit aendern — diese
|
||||
// Seite muss die aktuellen Werte zeigen statt eines eingefrorenen Build-Stands.
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function VersandZahlungPage() {
|
||||
const t = getDictionary(await getLocale());
|
||||
const tiers = await getShippingTiers();
|
||||
|
||||
const tierParagraphs =
|
||||
tiers.length > 0
|
||||
? tiers.map((tier) =>
|
||||
tier.maxQuantity === null
|
||||
? t.versandZahlungPage.tierMinimum(tier.minQuantity, formatPrice(tier.priceCents))
|
||||
: t.versandZahlungPage.tierRange(tier.minQuantity, tier.maxQuantity, formatPrice(tier.priceCents))
|
||||
)
|
||||
: [t.versandZahlungPage.tierFallback];
|
||||
|
||||
return (
|
||||
<LegalPage
|
||||
title={t.versandZahlungPage.title}
|
||||
noticeText={t.legalPage.reviewNotice}
|
||||
sections={[
|
||||
{
|
||||
heading: t.versandZahlungPage.shippingHeading,
|
||||
paragraphs: [t.versandZahlungPage.shippingIntro, ...tierParagraphs, t.versandZahlungPage.pickupNote],
|
||||
},
|
||||
{
|
||||
heading: t.versandZahlungPage.paymentHeading,
|
||||
paragraphs: [t.versandZahlungPage.paymentText],
|
||||
},
|
||||
{
|
||||
heading: t.versandZahlungPage.deliveryTimeHeading,
|
||||
paragraphs: [t.versandZahlungPage.deliveryTimeText],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user