'use client'; import { useState } from 'react'; import { Link } from '@/i18n/navigation'; import Image from 'next/image'; import { useTranslations } from 'next-intl'; import { forgotPassword } from '@/lib/api/auth'; export default function ForgotPasswordPage() { const t = useTranslations('auth.forgotPassword'); const tFooter = useTranslations('auth.footerLinks'); const [email, setEmail] = useState(''); const [success, setSuccess] = useState(false); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(''); setLoading(true); try { await forgotPassword(email); setSuccess(true); } catch (err: any) { setError(err.message || t('error')); } finally { setLoading(false); } }; return (
{t('successHint')}
{t('subtitle')}
{error}
{t('sidePanel.description')}
{t('sidePanel.features.secure.description')}
{t('sidePanel.features.email.description')}