'use client' import { ReactNode } from 'react' import { useRouter } from '../contexts/RouterContext' import { useStyles } from '../contexts/StylesContext' interface FooterLink { label: string href?: string onClick?: () => void } interface AuthCardProps { title: string subtitle?: string children?: ReactNode footerLinks?: FooterLink[] error?: string success?: string loading?: boolean loadingText?: string } export function AuthCard({ title, subtitle, children, footerLinks, error, success, loading, loadingText = 'Loading...', }: AuthCardProps) { const router = useRouter() const styles = useStyles() const handleLinkClick = (e: React.MouseEvent, href: string) => { e.preventDefault() router.push(href) } return (
{loadingText}
{subtitle}
} {error &&