Skip to content

Commit 3d89164

Browse files
committed
Run auto format fix in frontend
1 parent e771f39 commit 3d89164

File tree

12 files changed

+328
-281
lines changed

12 files changed

+328
-281
lines changed

frontend/src/app/components/auth/LoginComponent.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export default function LoginForm() {
2828

2929
const router = useRouter();
3030
const { setUser } = useUser();
31-
31+
3232
const handleLogin = async (e: React.MouseEvent<HTMLButtonElement>) => {
3333
e.preventDefault();
34-
34+
3535
// Basic validation
3636
if (!email || !password) {
3737
toast.error("Please fill in all fields");
@@ -40,9 +40,10 @@ export default function LoginForm() {
4040

4141
try {
4242
const response = await login(email, password);
43-
43+
4444
// Check if we got a token
45-
const token = response?.data?.data?.accessToken || response?.data?.accessToken;
45+
const token =
46+
response?.data?.data?.accessToken || response?.data?.accessToken;
4647
if (!token) {
4748
toast.error("Login failed: No token received");
4849
return;
@@ -62,19 +63,18 @@ export default function LoginForm() {
6263

6364
// Show success message
6465
handleApiSuccess(
65-
"Login successful!",
66+
"Login successful!",
6667
`Welcome back! Redirecting to homepage...`,
67-
response.data
68+
response.data,
6869
);
6970

7071
// Use router.replace instead of push for better Docker/Nginx compatibility
7172
setTimeout(() => {
7273
toast.dismiss();
7374
router.replace("/home");
7475
}, 1000);
75-
7676
} catch (error) {
77-
console.error('Login error details:', error);
77+
console.error("Login error details:", error);
7878
handleApiError(error, "Login failed");
7979
}
8080
};
@@ -92,9 +92,9 @@ export default function LoginForm() {
9292
<div className="flex flex-col gap-4">
9393
<div>
9494
<Label className="m-2">Email</Label>
95-
<Input
96-
name="email"
97-
type="email"
95+
<Input
96+
name="email"
97+
type="email"
9898
value={email}
9999
onChange={(e) => setEmail(e.target.value)}
100100
required
@@ -103,8 +103,8 @@ export default function LoginForm() {
103103
<div>
104104
<Label className="m-2">Password</Label>
105105
<div className="relative">
106-
<Input
107-
name="password"
106+
<Input
107+
name="password"
108108
type={showPassword ? "text" : "password"}
109109
value={password}
110110
onChange={(e) => setPassword(e.target.value)}
@@ -117,11 +117,12 @@ export default function LoginForm() {
117117
className="absolute right-1 top-1/2 -translate-y-1/2 h-8 w-8 hover:bg-transparent"
118118
onClick={() => setShowPassword(!showPassword)}
119119
>
120-
{password && (showPassword ? (
121-
<EyeOff className="h-4 w-4" />
122-
) : (
123-
<Eye className="h-4 w-4" />
124-
))}
120+
{password &&
121+
(showPassword ? (
122+
<EyeOff className="h-4 w-4" />
123+
) : (
124+
<Eye className="h-4 w-4" />
125+
))}
125126
</Button>
126127
</div>
127128
</div>

0 commit comments

Comments
 (0)