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,44 @@
|
||||
import { siteConfig } from "@/lib/site-config";
|
||||
import { getContentValues } from "@/lib/content";
|
||||
|
||||
const COMPANY_KEYS = [
|
||||
"company.name",
|
||||
"company.claim",
|
||||
"company.claimAlt",
|
||||
"company.description",
|
||||
"company.location",
|
||||
"company.email",
|
||||
"company.phone",
|
||||
"company.street",
|
||||
"company.zip",
|
||||
"company.city",
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Drop-in-Ersatz fuer siteConfig mit admin-gepflegten Overrides (siehe
|
||||
* admin/inhalte) — gleiche Feldnamen/Form wie siteConfig, damit bestehende
|
||||
* Konsumenten nur `siteConfig` gegen `await getCompanyInfo()` tauschen
|
||||
* muessen. domain/country bleiben aus siteConfig (keine Content-Felder,
|
||||
* echte Infra-Werte).
|
||||
*/
|
||||
export async function getCompanyInfo() {
|
||||
// Firmendaten sind nicht lokalisiert (siehe content-registry.ts) — die
|
||||
// uebergebene Locale wirkt sich fuer diese Schluessel nicht aus.
|
||||
const v = await getContentValues([...COMPANY_KEYS], "de");
|
||||
return {
|
||||
...siteConfig,
|
||||
name: v["company.name"],
|
||||
claim: v["company.claim"],
|
||||
claimAlt: v["company.claimAlt"],
|
||||
description: v["company.description"],
|
||||
location: v["company.location"],
|
||||
email: v["company.email"],
|
||||
phone: v["company.phone"],
|
||||
address: {
|
||||
...siteConfig.address,
|
||||
street: v["company.street"],
|
||||
zip: v["company.zip"],
|
||||
city: v["company.city"],
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user