diff --git a/client/src/LandingPage.jsx b/client/src/LandingPage.jsx index 476e3dd..9d9cdd6 100644 --- a/client/src/LandingPage.jsx +++ b/client/src/LandingPage.jsx @@ -40,15 +40,15 @@ const LandingPage = () => { return (
{/* Header */} -
-

+
+

Bit by Query - SQL Competition Platform

{userInfo ? ( -
+
- + Logged in as{" "} {userInfo.username} @@ -58,7 +58,7 @@ const LandingPage = () => { ) : ( @@ -66,23 +66,23 @@ const LandingPage = () => {
{/* Main Content */} -
+
{/* Project Intro */} -
-

+
+

Welcome to Bit by Query

-

+

A full-stack SQL competition platform where participants can test their SQL knowledge, compete with peers, and rise up the leaderboard.

{/* Rules Section */} -
-

+
+

Competition Rules & Highlights

-
    +
    • Each user must register before joining the contest.
    • Contest includes SQL query challenges of varying difficulty.
    • Leaderboard is updated in real-time based on scores.
    • @@ -95,15 +95,15 @@ const LandingPage = () => {
    {/* Rules Checkbox */} -
    +
    -
    @@ -113,9 +113,9 @@ const LandingPage = () => {

{/* Footer */} -

); }; -export default LandingPage; +export default LandingPage; \ No newline at end of file diff --git a/client/src/Login.jsx b/client/src/Login.jsx index a1d4fa2..fa757aa 100644 --- a/client/src/Login.jsx +++ b/client/src/Login.jsx @@ -10,7 +10,8 @@ function Login() { const [password, setPassword] = useState(""); const [error, setError] = useState(null); const [loading, setLoading] = useState(false); - const dispatch=useDispatch(); + const [showPassword, setShowPassword] = useState(false); + const dispatch = useDispatch(); const navigate = useNavigate(); const handleLogin = async (e) => { @@ -30,7 +31,7 @@ function Login() { password, }); - const user=response.data.user; + const user = response.data.user; dispatch(login(user)); toast.success("Login successful!"); @@ -40,12 +41,16 @@ function Login() { } catch (err) { const message = err.response?.data?.error || "Unable to login. Please try again."; - setError(message); // show error in UI + setError(message); } finally { setLoading(false); } }; + const togglePasswordVisibility = () => { + setShowPassword(!showPassword); + }; + return (
setUsername(e.target.value)} placeholder="Enter ACM ID" @@ -94,21 +99,44 @@ function Login() {
setPassword(e.target.value)} placeholder="Enter password" required /> - + +
{loading ? "Logging in..." : "Login"} -
-

+


+

New user?{" "} - + Sign up

-

+

Difficulties logging in? Contact team members.

-

+

Dummy Credentials:
ACM ID: test, Pass: 123 @@ -150,4 +178,4 @@ function Login() { ); } -export default Login; +export default Login; \ No newline at end of file