Skip to content

Commit 02a5538

Browse files
committed
Fix login styling and add email/password fields
1 parent df17524 commit 02a5538

3 files changed

Lines changed: 68 additions & 23 deletions

File tree

apps/frontend/app/components/SignUpForm.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@ import Link from "next/link";
22

33
export default function SignupForm({ onSignupSuccess }: { onSignupSuccess: () => void }) {
44
return (
5-
<div className="w-full max-w-md space-y-6 rounded-lg border border-black p-8">
6-
<h1 className="mb-8 text-center text-4xl">Register</h1>
5+
<div className="w-full max-w-md space-y-6 rounded-lg border border-slate-300 bg-white p-8 text-slate-900 shadow-lg">
6+
<h1 className="mb-8 text-center text-4xl font-semibold text-slate-900">Register</h1>
77
<div className="space-y-4">
88
<div>
9-
<label className="mb-1 block text-sm font-medium">Email</label>
10-
<input type="email" className="w-full rounded-sm border border-black p-2" />
9+
<label className="mb-1 block text-sm font-medium text-slate-800">Email</label>
10+
<input
11+
type="email"
12+
className="w-full rounded-sm border border-slate-300 bg-white p-2 text-slate-900 placeholder:text-slate-400"
13+
/>
1114
</div>
1215
<div>
13-
<label className="mb-1 block text-sm font-medium">Password</label>
14-
<input type="password" className="w-full rounded-sm border border-black p-2" />
16+
<label className="mb-1 block text-sm font-medium text-slate-800">Password</label>
17+
<input
18+
type="password"
19+
className="w-full rounded-sm border border-slate-300 bg-white p-2 text-slate-900 placeholder:text-slate-400"
20+
/>
1521
</div>
1622
</div>
1723
<button
1824
onClick={onSignupSuccess}
19-
className="w-full rounded bg-gray-200 py-3 text-lg transition-colors hover:bg-gray-300"
25+
className="w-full rounded bg-slate-200 py-3 text-lg font-medium text-slate-900 transition-colors hover:bg-slate-300"
2026
>
2127
Register
2228
</button>
23-
<p className="mt-4 text-center text-sm">
29+
<p className="mt-4 text-center text-sm text-slate-700">
2430
Have an account?{" "}
25-
<Link href="/login" className="font-semibold hover:underline">
31+
<Link href="/login" className="font-semibold text-slate-900 hover:underline">
2632
Login
2733
</Link>
2834
</p>

apps/frontend/app/login/page.tsx

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,66 @@
11
"use client";
2+
import { useState } from "react";
23
import Link from "next/link";
34

45
export default function LoginPage() {
5-
const handleLogin = () => console.log("Standard login triggered");
6-
const handleGithubLogin = () => console.log("Github OAuth triggered");
7-
const handleGoogleLogin = () => console.log("Google OAuth triggered");
6+
const [email, setEmail] = useState("");
7+
const [password, setPassword] = useState("");
8+
9+
const logLoginAttempt = (method: "standard" | "github" | "google") => {
10+
console.log("Login attempt", {
11+
method,
12+
email,
13+
password,
14+
});
15+
};
16+
17+
const handleLogin = () => logLoginAttempt("standard");
18+
const handleGithubLogin = () => logLoginAttempt("github");
19+
const handleGoogleLogin = () => logLoginAttempt("google");
820

921
return (
10-
<div className="flex min-h-screen items-center justify-center bg-white p-4">
11-
<div className="w-full max-w-md space-y-6 rounded-lg border border-black p-8">
12-
<h1 className="mb-8 text-center text-4xl">Login</h1>
13-
{/* ... Email/Password inputs ... */}
22+
<div className="flex min-h-screen items-center justify-center bg-white p-4 text-slate-900">
23+
<div className="w-full max-w-md space-y-6 rounded-lg border border-slate-300 bg-white p-8 shadow-lg">
24+
<h1 className="mb-8 text-center text-4xl font-semibold text-slate-900">Login</h1>
25+
<div className="space-y-4">
26+
<div>
27+
<label htmlFor="email" className="mb-1 block text-sm font-medium text-slate-800">
28+
Email
29+
</label>
30+
<input
31+
id="email"
32+
type="email"
33+
value={email}
34+
onChange={(event) => setEmail(event.target.value)}
35+
className="w-full rounded border border-slate-300 bg-white px-3 py-2 text-slate-900 placeholder:text-slate-400"
36+
placeholder="you@example.com"
37+
/>
38+
</div>
39+
<div>
40+
<label htmlFor="password" className="mb-1 block text-sm font-medium text-slate-800">
41+
Password
42+
</label>
43+
<input
44+
id="password"
45+
type="password"
46+
value={password}
47+
onChange={(event) => setPassword(event.target.value)}
48+
className="w-full rounded border border-slate-300 bg-white px-3 py-2 text-slate-900 placeholder:text-slate-400"
49+
placeholder="Enter your password"
50+
/>
51+
</div>
52+
</div>
1453
<button
1554
onClick={handleLogin}
16-
className="w-full rounded bg-gray-200 py-3 text-lg hover:bg-gray-300"
55+
className="w-full rounded bg-slate-200 py-3 text-lg font-medium text-slate-900 transition hover:bg-slate-300"
1756
>
1857
Login
1958
</button>
2059
<div className="text-right">
2160
<Link
2261
href="/forgot-password"
2362
title="Forgot Password?"
24-
className="text-xs hover:underline"
63+
className="text-xs text-slate-700 hover:text-slate-900 hover:underline"
2564
>
2665
Forgot Password?
2766
</Link>
@@ -30,20 +69,20 @@ export default function LoginPage() {
3069
<div className="space-y-3">
3170
<button
3271
onClick={handleGithubLogin}
33-
className="w-full rounded bg-gray-200 py-3 hover:bg-gray-300"
72+
className="w-full rounded bg-slate-200 py-3 font-medium text-slate-900 transition hover:bg-slate-300"
3473
>
3574
Login with Github
3675
</button>
3776
<button
3877
onClick={handleGoogleLogin}
39-
className="w-full rounded bg-gray-200 py-3 hover:bg-gray-300"
78+
className="w-full rounded bg-slate-200 py-3 font-medium text-slate-900 transition hover:bg-slate-300"
4079
>
4180
Login with Google
4281
</button>
4382
</div>
44-
<p className="mt-4 text-center text-sm">
83+
<p className="mt-4 text-center text-sm text-slate-700">
4584
Don&apos;t have an account?{" "}
46-
<Link href="/signup" className="font-semibold hover:underline">
85+
<Link href="/signup" className="font-semibold text-slate-900 hover:underline">
4786
Register
4887
</Link>
4988
</p>

apps/frontend/app/signup/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function SignupPage() {
77
const [isSignedUp, setIsSignedUp] = useState(false);
88

99
return (
10-
<div className="flex min-h-screen items-center justify-center bg-white p-4">
10+
<div className="flex min-h-screen items-center justify-center bg-white p-4 text-slate-900">
1111
{isSignedUp ? (
1212
<Onboarding onBack={() => setIsSignedUp(false)} />
1313
) : (

0 commit comments

Comments
 (0)