Auf dieser Liste steht gerade nichts.
) : (import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { Blocks, CalendarDays, Gift } from 'lucide-react'; import { PublicWishlist, type PublicItem } from '@/components/wunschlisten/public-wishlist'; import { Badge } from '@/components/ui/badge'; import { formatDate, pluralize } from '@/lib/format'; import { occasionLabel } from '@/lib/labels'; import { getWishlistByShareToken, listWishlistItems } from '@/lib/queries/wishlists'; type Props = { params: Promise<{ shareToken: string }> }; /** * The public face of a wishlist. * * Reachable with the share token alone, and it exposes nothing beyond the * wishlist itself - no owner name, no collection, no other lists. Search * engines are kept out; this is meant to be shared, not found. */ export const metadata: Metadata = { title: 'Wunschliste', robots: { index: false, follow: false }, }; export default async function PublicWishlistPage({ params }: Props) { const { shareToken } = await params; const list = getWishlistByShareToken(shareToken); if (!list || !list.isPublic) notFound(); const rows = listWishlistItems(list.id, list.collectorId); // Fulfilled wishes are gone from the public view: the present is already // under the tree, no reason to let someone buy it twice. const open = rows.filter((row) => row.fulfilledAt === null); const items: PublicItem[] = open.map((row) => ({ id: row.id, setNumber: row.setNumber, setName: row.setName, year: row.year, pieceCount: row.pieceCount, imageUrl: row.imageUrl, imagePath: row.imagePath, retailPriceCents: row.retailPriceCents, manufacturerName: row.manufacturerName, manufacturerWebsite: row.manufacturerWebsite, themeName: row.themeName, priority: row.priority, note: row.note, isReserved: row.reservedAt !== null, reservedByName: row.reservedByName, })); const openCount = items.filter((item) => !item.isReserved).length; return (
{list.note}
) : null}Klick auf „Das schenke ich“, damit niemand dasselbe doppelt kauft. Eine Anmeldung brauchst du dafür nicht.
Auf dieser Liste steht gerade nichts.
) : (