diff --git a/frontend/src/components/ClearHistoryModal.tsx b/frontend/src/components/ClearHistoryModal.tsx index 74f5ceb..19ef61e 100644 --- a/frontend/src/components/ClearHistoryModal.tsx +++ b/frontend/src/components/ClearHistoryModal.tsx @@ -1,8 +1,6 @@ import { useState } from 'react'; import { clearAllTransactions } from '../api/transactions'; -const CONFIRM_WORD = 'УДАЛИТЬ'; - interface Props { onClose: () => void; onDone: () => void; @@ -10,15 +8,11 @@ interface Props { export function ClearHistoryModal({ onClose, onDone }: Props) { const [check1, setCheck1] = useState(false); - const [confirmInput, setConfirmInput] = useState(''); const [check2, setCheck2] = useState(false); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); - const canConfirm = - check1 && - confirmInput.trim().toUpperCase() === CONFIRM_WORD && - check2; + const canConfirm = check1 && check2; const handleConfirm = async () => { if (!canConfirm || loading) return; @@ -65,20 +59,6 @@ export function ClearHistoryModal({ onClose, onDone }: Props) { -
- - setConfirmInput(e.target.value)} - placeholder={CONFIRM_WORD} - className={confirmInput && confirmInput.trim().toUpperCase() !== CONFIRM_WORD ? 'input-error' : ''} - autoComplete="off" - /> -
-