diff --git a/src/pages/Login/Login.tsx b/src/pages/Login/Login.tsx index d8110eb..a1cb9dd 100644 --- a/src/pages/Login/Login.tsx +++ b/src/pages/Login/Login.tsx @@ -1,8 +1,7 @@ import React, { useState, ChangeEvent, FormEvent, useContext } from "react"; import axios from "axios"; import { useNavigate, Link } from "react-router-dom"; -import { ArrowRight, Lock, Mail, ShieldCheck, Sparkles } from "lucide-react"; -import AuthShell from "../../components/AuthShell"; +import { Eye, EyeOff } from "lucide-react"; import { ThemeContext } from "../../context/ThemeContext"; import type { ThemeContextType } from "../../context/ThemeContext"; import { AuthContext } from "../../context/AuthContext"; @@ -18,6 +17,7 @@ const Login: React.FC = () => { const [formData, setFormData] = useState({ email: "", password: "" }); const [message, setMessage] = useState(""); const [isLoading, setIsLoading] = useState(false); + const [showPassword, setShowPassword] = useState(false); const navigate = useNavigate(); const themeContext = useContext(ThemeContext) as ThemeContextType; @@ -120,31 +120,41 @@ const Login: React.FC = () => {
-
- + type={showPassword ? "text" : "password"} + name="password" + autoComplete="current-password" + placeholder="Enter your password" + value={formData.password} + onChange={handleChange} + required + className={`w-full pl-4 pr-12 py-4 rounded-2xl focus:outline-none transition-all ${ + mode === "dark" + ? "bg-white/5 border border-white/10 text-white placeholder-slate-400 focus:ring-2 focus:ring-purple-500" + : "bg-gray-100 border border-gray-300 text-gray-900 placeholder-gray-500 focus:ring-2 focus:ring-purple-400" + }`} + /> + + - - + + - {message && ( -