Harden milestone sharing and X publishing

This commit is contained in:
2026-08-14 18:19:55 +02:00
parent d8f7202bf6
commit 4ec70ed30f
8 changed files with 191 additions and 63 deletions

View File

@@ -18,8 +18,8 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
const card = share.cardData as { qrTitle?: string; totalUniqueScans?: number } | null;
const count = card?.totalUniqueScans || 0;
const title = share.language === 'de'
? `${count.toLocaleString('de-DE')} eindeutige QR-Scans erreicht`
: `${count.toLocaleString('en-US')} unique QR scans reached`;
? `${count.toLocaleString('de-DE')} ${count === 1 ? 'eindeutiger QR-Scan' : 'eindeutige QR-Scans'} erreicht`
: `${count.toLocaleString('en-US')} unique QR ${count === 1 ? 'scan' : 'scans'} reached`;
const description = share.language === 'de'
? `${card?.qrTitle || 'Ein QR-Code'} hat einen verifizierten Scan-Meilenstein mit QR Master erreicht.`
: `${card?.qrTitle || 'A QR code'} reached a verified scan milestone with QR Master.`;