FEAT: BorderSpeed Up on Login

This commit is contained in:
EvanLin3141
2025-01-29 23:20:23 +00:00
parent 06234bcac2
commit 92f691b6bd
4 changed files with 13 additions and 6 deletions

View File

@@ -14,7 +14,12 @@ interface FormErrors {
general?: string; // For general authentication errors
}
const LoginForm: React.FC = () => {
//Speed up border animation
interface SubmitProps {
onSubmit: () => void;
}
const LoginForm: React.FC<SubmitProps> = ({ onSubmit }) => {
const { setIsLoggedIn } = useAuth();
const [formData, setFormData] = useState<LoginFormData>({
@@ -46,6 +51,7 @@ const LoginForm: React.FC = () => {
};
const handleSubmit = async (e: React.FormEvent) => {
onSubmit();
e.preventDefault();
if (validateForm()) {
@@ -94,7 +100,7 @@ const LoginForm: React.FC = () => {
<form
onSubmit={handleSubmit}
id="login-form"
className="h-[100%] flex flex-col h-full justify-evenly items-center"
className="h-[100%] flex flex-col justify-evenly items-center"
>
{errors.general && (
<p className="text-red-500 text-sm text-center">{errors.general}</p>