import { type FormEvent, useState } from 'react';
import { Navigate } from 'react-router';
import { useAuthStore } from './auth-store';
import styles from './LoginPage.module.css';
export function LoginPage() {
const { isAuthenticated, login, loading, error } = useAuthStore();
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
if (isAuthenticated) return