mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-08 00:44:22 +00:00
Migrate all modals to ts
This commit is contained in:
@@ -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 {
|
||||
Reference in New Issue
Block a user