Skip to content

Commit a43737f

Browse files
committed
Fix styling using prettier to pass CI workflow
1 parent 14bc476 commit a43737f

File tree

17 files changed

+254
-314
lines changed

17 files changed

+254
-314
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import LoginForm from "@/app/components/auth/LoginForm";
22

3-
43
export default function LoginPage() {
5-
return (
6-
<div className="h-screen flex items-center justify-center">
7-
<LoginForm />
8-
</div>
9-
)
10-
}
4+
return (
5+
<div className="h-screen flex items-center justify-center">
6+
<LoginForm />
7+
</div>
8+
);
9+
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import SignupForm from "@/app/components/auth/SignUpForm";
22

33
export default function SignUpPage() {
4-
return (
5-
<div className="h-screen flex items-center justify-center">
6-
<SignupForm/>
7-
</div>
8-
)
9-
}
4+
return (
5+
<div className="h-screen flex items-center justify-center">
6+
<SignupForm />
7+
</div>
8+
);
9+
}

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

Lines changed: 45 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,48 @@ import { Label } from "@/components/ui/label";
77
import Link from "next/link";
88

99
export default function LoginForm() {
10-
11-
12-
function handleLogin() {
13-
window.location.href = "/home";
14-
};
15-
16-
return (
17-
<Card className="min-h-[50%] min-w-[40%]">
18-
<CardHeader className="mt-5">
19-
<CardTitle className="text-center text-4xl font-bold">
20-
Welcome to Peerprep
21-
</CardTitle>
22-
</CardHeader>
23-
24-
<CardContent className="px-15 pt-10">
25-
<form>
26-
<div className="flex flex-col gap-4">
27-
<div>
28-
<Label className="m-2">
29-
Email
30-
</Label>
31-
<Input name="email" type="email" required>
32-
</Input>
33-
</div>
34-
<div>
35-
<Label className="m-2">
36-
Password
37-
</Label>
38-
<Input name="password" type="password" required>
39-
</Input>
40-
</div>
41-
42-
<div className="flex justify-center ">
43-
<Button onClick={() => handleLogin()} className="w-full">
44-
Login
45-
</Button>
46-
</div>
47-
48-
<div className="flex">
49-
<div>
50-
Do not have an account?
51-
</div>
52-
<Link href="/auth/signup" className="ml-3 text-blue-500 hover:underline">
53-
Signup
54-
</Link>
55-
</div>
56-
57-
</div>
58-
</form>
59-
</CardContent>
60-
61-
</Card>
62-
)
63-
}
10+
function handleLogin() {
11+
window.location.href = "/home";
12+
}
13+
14+
return (
15+
<Card className="min-h-[50%] min-w-[40%]">
16+
<CardHeader className="mt-5">
17+
<CardTitle className="text-center text-4xl font-bold">
18+
Welcome to Peerprep
19+
</CardTitle>
20+
</CardHeader>
21+
22+
<CardContent className="px-15 pt-10">
23+
<form>
24+
<div className="flex flex-col gap-4">
25+
<div>
26+
<Label className="m-2">Email</Label>
27+
<Input name="email" type="email" required></Input>
28+
</div>
29+
<div>
30+
<Label className="m-2">Password</Label>
31+
<Input name="password" type="password" required></Input>
32+
</div>
33+
34+
<div className="flex justify-center ">
35+
<Button onClick={() => handleLogin()} className="w-full">
36+
Login
37+
</Button>
38+
</div>
39+
40+
<div className="flex">
41+
<div>Do not have an account?</div>
42+
<Link
43+
href="/auth/signup"
44+
className="ml-3 text-blue-500 hover:underline"
45+
>
46+
Signup
47+
</Link>
48+
</div>
49+
</div>
50+
</form>
51+
</CardContent>
52+
</Card>
53+
);
54+
}

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

Lines changed: 37 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,40 @@ import { Input } from "@/components/ui/input";
66
import { Label } from "@/components/ui/label";
77

88
export default function SignupForm() {
9-
10-
function NavigateToLogin() {
11-
window.location.href = "/auth/login";
12-
};
13-
14-
return (
15-
<Card className="min-h-[50%] min-w-[40%]">
16-
<CardHeader className="mt-5">
17-
<CardTitle className="text-center text-4xl font-bold">
18-
Register an account
19-
</CardTitle>
20-
</CardHeader>
21-
22-
<CardContent className="px-15 pt-10">
23-
<form>
24-
<div className="flex flex-col gap-4">
25-
<div>
26-
<Label className="m-2">
27-
Email
28-
</Label>
29-
<Input name="email" type="email" required>
30-
</Input>
31-
</div>
32-
<div>
33-
<Label className="m-2">
34-
Password
35-
</Label>
36-
<Input name="password" type="password" required>
37-
</Input>
38-
</div>
39-
40-
<div className="flex justify-center ">
41-
<Button className="w-full">
42-
Register
43-
</Button>
44-
</div>
45-
46-
<div>
47-
<Button onClick={() => NavigateToLogin()}>
48-
Back
49-
</Button>
50-
</div>
51-
52-
</div>
53-
</form>
54-
</CardContent>
55-
56-
</Card>
57-
)
58-
}
9+
function NavigateToLogin() {
10+
window.location.href = "/auth/login";
11+
}
12+
13+
return (
14+
<Card className="min-h-[50%] min-w-[40%]">
15+
<CardHeader className="mt-5">
16+
<CardTitle className="text-center text-4xl font-bold">
17+
Register an account
18+
</CardTitle>
19+
</CardHeader>
20+
21+
<CardContent className="px-15 pt-10">
22+
<form>
23+
<div className="flex flex-col gap-4">
24+
<div>
25+
<Label className="m-2">Email</Label>
26+
<Input name="email" type="email" required></Input>
27+
</div>
28+
<div>
29+
<Label className="m-2">Password</Label>
30+
<Input name="password" type="password" required></Input>
31+
</div>
32+
33+
<div className="flex justify-center ">
34+
<Button className="w-full">Register</Button>
35+
</div>
36+
37+
<div>
38+
<Button onClick={() => NavigateToLogin()}>Back</Button>
39+
</div>
40+
</div>
41+
</form>
42+
</CardContent>
43+
</Card>
44+
);
45+
}

frontend/src/app/components/home/HistoryPage.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@
33
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
44

55
export default function HistoryPage() {
6-
return (
7-
<Card className="w-[60%] mr-3">
8-
<CardHeader>
9-
<CardTitle className="text-2xl font-bold">
10-
Recent Sessions
11-
</CardTitle>
12-
</CardHeader>
13-
14-
<CardContent>
15-
{/* TODO Add scrollable area of sessions */}
16-
17-
</CardContent>
18-
</Card>
19-
)
20-
}
6+
return (
7+
<Card className="w-[60%] mr-3">
8+
<CardHeader>
9+
<CardTitle className="text-2xl font-bold">Recent Sessions</CardTitle>
10+
</CardHeader>
11+
12+
<CardContent>{/* TODO Add scrollable area of sessions */}</CardContent>
13+
</Card>
14+
);
15+
}

frontend/src/app/components/home/QuickActionsPage.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
import { Card, CardHeader, CardTitle } from "@/components/ui/card";
44

55
export default function QuickActionsPage() {
6-
return (
7-
<Card className="ml-3 w-[40%]">
8-
<CardHeader>
9-
<CardTitle className="text-2xl font-bold">
10-
Quick Actions
11-
</CardTitle>
12-
</CardHeader>
13-
</Card>
14-
)
15-
}
6+
return (
7+
<Card className="ml-3 w-[40%]">
8+
<CardHeader>
9+
<CardTitle className="text-2xl font-bold">Quick Actions</CardTitle>
10+
</CardHeader>
11+
</Card>
12+
);
13+
}

frontend/src/app/components/home/StatisticPage.tsx

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,31 @@
22

33
import { Card, CardHeader, CardTitle } from "@/components/ui/card";
44
export default function StatisticPage() {
5-
return (
6-
<div className="h-[10%] flex justify-evenly">
5+
return (
6+
<div className="h-[10%] flex justify-evenly">
7+
<Card className="mx-10 w-[30%] h-full">
8+
<CardHeader>
9+
<CardTitle>Total time spent coding</CardTitle>
10+
</CardHeader>
11+
</Card>
712

8-
<Card className="mx-10 w-[30%] h-full">
9-
<CardHeader>
10-
<CardTitle>
11-
Total time spent coding
12-
</CardTitle>
13-
</CardHeader>
14-
</Card>
13+
<Card className="mx-10 w-[30%] h-full">
14+
<CardHeader>
15+
<CardTitle>Total Problems Solved</CardTitle>
16+
</CardHeader>
17+
</Card>
1518

16-
<Card className="mx-10 w-[30%] h-full">
17-
<CardHeader>
18-
<CardTitle>
19-
Total Problems Solved
20-
</CardTitle>
21-
</CardHeader>
22-
</Card>
19+
<Card className="mx-10 w-[30%] h-full">
20+
<CardHeader>
21+
<CardTitle>Sessions Completed</CardTitle>
22+
</CardHeader>
23+
</Card>
2324

24-
<Card className="mx-10 w-[30%] h-full">
25-
<CardHeader>
26-
<CardTitle>
27-
Sessions Completed
28-
</CardTitle>
29-
</CardHeader>
30-
</Card>
31-
32-
<Card className="mx-10 w-[30%] h-full">
33-
<CardHeader>
34-
<CardTitle>
35-
Favourite Topic
36-
</CardTitle>
37-
</CardHeader>
38-
</Card>
39-
40-
</div>
41-
)
42-
}
25+
<Card className="mx-10 w-[30%] h-full">
26+
<CardHeader>
27+
<CardTitle>Favourite Topic</CardTitle>
28+
</CardHeader>
29+
</Card>
30+
</div>
31+
);
32+
}

0 commit comments

Comments
 (0)