Удален файл конфигурации Next.js и несколько SVG-изображений. В компоненте ContactForm и ContactModal улучшена обработка ошибок и добавлена динамическая классовая логика для отображения состояния ошибки. В компоненте Hero также обновлена логика классов. Упрощен компонент Input. Удалены неиспользуемые импорты в компоненте Contacts.

This commit is contained in:
Bivekich
2025-04-03 17:28:15 +03:00
parent 9b75339c1e
commit 8657c49026
19 changed files with 142 additions and 48 deletions

View File

@ -8,6 +8,7 @@ import { Phone, CheckCircle2, AlertCircle } from 'lucide-react';
import { formatPhoneNumber, validatePhoneNumber } from '@/lib/utils';
import { sendTelegramNotification } from '@/lib/telegram';
import ContactModal from './ContactModal';
import { cn } from '@/lib/utils';
const Hero = () => {
const [phone, setPhone] = useState('');
@ -47,7 +48,7 @@ const Hero = () => {
'Произошла ошибка при отправке заявки. Пожалуйста, попробуйте позже.'
);
}
} catch (error) {
} catch {
setError(
'Произошла ошибка при отправке заявки. Пожалуйста, попробуйте позже.'
);
@ -134,7 +135,10 @@ const Hero = () => {
placeholder="+7 (999) 999-99-99"
value={phone}
onChange={handlePhoneChange}
className="pl-10 bg-white/10 border-white/20 text-white placeholder:text-blue-200 focus:border-white"
className={cn(
'pl-10 bg-white/10 border-white/20 text-white placeholder:text-blue-200 focus:border-white',
error && 'border-red-300'
)}
required
disabled={isLoading || isSubmitted}
/>