-
+
+
+
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 = () => {
);
};
-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
/>
-
+
+
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 = () => {
);
};
-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
/>
-
+
+
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 = () => {
+
);
};
-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 (
-
@@ -113,9 +113,9 @@ const LandingPage = () => {
setPassword(e.target.value)}
placeholder="Enter password"
required
/>
-
+
+