Migrate all modals to ts

This commit is contained in:
2025-05-12 21:26:07 +02:00
parent b7be5a46a2
commit 924d710b2f
11 changed files with 160 additions and 48 deletions

View File

@@ -8,8 +8,18 @@ import {
Button,
} from '@mantine/core';
const DeleteAccountModal = ({ opened, onClose, onConfirm }) => {
const [password, setPassword] = useState('');
interface DeleteAccountModalProps {
opened: boolean;
onClose: () => void;
onConfirm: (password: string) => Promise<void>;
}
const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
opened,
onClose,
onConfirm,
}) => {
const [password, setPassword] = useState<string>('');
return (
<Modal

View File

@@ -8,8 +8,20 @@ import {
PasswordInput,
} from '@mantine/core';
const EmailPasswordModal = ({ opened, onClose, onConfirm, email }) => {
const [password, setPassword] = useState('');
interface EmailPasswordModalProps {
opened: boolean;
onClose: () => void;
onConfirm: (password: string) => Promise<void>;
email: string;
}
const EmailPasswordModal: React.FC<EmailPasswordModalProps> = ({
opened,
onClose,
onConfirm,
email,
}) => {
const [password, setPassword] = useState<string>('');
return (
<Modal