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

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { FormEvent, useState } from 'react';
import {
TextInput,
PasswordInput,
@@ -11,13 +11,13 @@ import {
} from '@mantine/core';
import { useAuth } from '../../contexts/AuthContext';
const LoginPage = () => {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [loading, setLoading] = useState(false);
const LoginPage: React.FC = () => {
const [email, setEmail] = useState<string>('');
const [password, setPassword] = useState<string>('');
const [loading, setLoading] = useState<boolean>(false);
const { login } = useAuth();
const handleSubmit = async (e) => {
const handleSubmit = async (e: FormEvent<HTMLElement>): Promise<void> => {
e.preventDefault();
setLoading(true);
try {