/* eslint-disable @next/next/no-img-element -- Share card rendering requires direct img tags for html-to-image output. */ import { QRCodeSVG } from "qrcode.react"; import type { ReactNode } from "react"; export interface ShareCardTheme { emoji: string; tagline: string; bgColor: string; gradientBorder: string; accentLine: string; glows: { top: number; right: number; width: number; height: number; color: string }[]; qrFgColor: string; } export default function ShareCardShell({ theme, cardRef, bgDataUrl, children, }: { theme: ShareCardTheme; cardRef: React.RefObject; bgDataUrl?: string | null; children: ReactNode; }) { const shareUrl = typeof window !== "undefined" ? window.location.origin : "nowhatever.app"; return (
{/* Background image */} {bgDataUrl && ( )} {/* Decorative glows */} {theme.glows.map((g, i) => (
))} {/* Brand header */}
{theme.emoji}
NoWhatever
{theme.tagline}
{/* Thin accent line */}
{/* Card-specific content */} {children} {/* QR footer */}
扫码一起「别说随便」
{shareUrl.replace(/^https?:\/\//, "")}
); }