import type { Metadata } from "next"; import type { HTMLAttributes } from "react"; import { redirect } from "next/navigation"; import { Container, SectionHeading, Button, FormPanel } from "@/components/ui"; import { HexMark } from "@/components/honeycomb"; import { BackLink } from "@/components/back-link"; import { AccountEmptyState, AddressIcon } from "@/components/account-ui"; import { getCurrentCustomer } from "@/lib/auth"; import { getAddressesForCustomer } from "@/lib/account-data"; import { addAddressAction, deleteAddressAction, setDefaultAddressAction } from "../actions"; import { getLocale } from "@/i18n/locale"; import { getDictionary } from "@/i18n/get-dictionary"; export const metadata: Metadata = { title: "Meine Adressen" }; export const dynamic = "force-dynamic"; export default async function KontoAdressenPage() { const t = getDictionary(await getLocale()); const customer = await getCurrentCustomer(); if (!customer) redirect("/konto"); const addresses = await getAddressesForCustomer(customer.id); return (
{address.label}
{address.firstName} {address.lastName}
{address.street}
{address.zip} {address.city}