"use client"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Code2 } from "lucide-react"; interface LoginFormProps { onSubmit: (email: string, password: string) => void; onSwitchToRegister: () => void; loading?: boolean; } export function LoginForm({ onSubmit, onSwitchToRegister, loading = false, }: LoginFormProps) { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (email && password) { onSubmit(email, password); } }; const isValid = email.length > 0 && password.length > 0; return (
PeakSkills

Connexion

Connectez-vous à votre compte PeakSkills

Se connecter Entrez vos identifiants pour accéder à votre compte
setEmail(e.target.value)} placeholder="votre@email.com" required className="bg-white/10 border-white/20 text-white placeholder:text-slate-400" />
setPassword(e.target.value)} placeholder="Votre mot de passe" required className="bg-white/10 border-white/20 text-white placeholder:text-slate-400" />

Pas encore de compte ?{" "}

); }