import React, { FormEvent, useState } from 'react'; import { TextInput, PasswordInput, Paper, Title, Container, Button, Text, Stack, } from '@mantine/core'; import { useAuth } from '../../contexts/AuthContext'; const LoginPage: React.FC = () => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [loading, setLoading] = useState(false); const { login } = useAuth(); const handleSubmit = async (e: FormEvent): Promise => { e.preventDefault(); setLoading(true); try { await login(email, password); } finally { setLoading(false); } }; return ( Welcome to Lemma Please sign in to continue
setEmail(event.currentTarget.value)} /> setPassword(event.currentTarget.value)} />
); }; export default LoginPage;