Доработка мелочей и начало интернац.

This commit is contained in:
test 2025-07-07 17:35:46 +05:00
parent 486d46c467
commit 48e8551b0e
21 changed files with 408 additions and 76 deletions

View file

@ -146,6 +146,20 @@ export const Settings = ({ onClose }: Props) => {
}
};
// Обработка нажатий клавиш
useEffect(() => {
const handleKeyPress = (e: React.KeyboardEvent<HTMLElement>) => {
if (e.key === 'Enter')
handleSave();
if (e.key === 'Escape')
handleCancel()
};
document.addEventListener('keydown', handleKeyPress);
return () => {
document.removeEventListener('keydown', handleKeyPress);
};
}, []);
return (
<ModalContainer style={{ height: '60vh', width: '50vw', minWidth: "800px" }}>
<ModalTitle>