import { useState } from 'react' import { api } from '../utils/api' export default function EmailVerificationBanner({ profile }) { const [resending, setResending] = useState(false) const [success, setSuccess] = useState(false) const [error, setError] = useState(null) // Only show if email is not verified if (!profile || profile.email_verified !== false) return null const handleResend = async () => { if (!profile.email) return setResending(true) setError(null) setSuccess(false) try { await api.resendVerification(profile.email) setSuccess(true) setTimeout(() => setSuccess(false), 5000) } catch (err) { setError(err.message || 'Fehler beim Versenden') setTimeout(() => setError(null), 5000) } finally { setResending(false) } } return (