Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/forgot-password/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import React, { useState } from "react";

export default function Page() {
return <div>FORGOTPASSWORD</div>;
}
75 changes: 75 additions & 0 deletions app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
"use client";

import React, { useState } from "react";
import Link from "next/link";
import { useRouter } from "next/navigation";

export default function Page() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const router = useRouter();

const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
console.log("Login attempt:", { email, password });

// TODO: Replace with real authentication
if (email === "test" && password === "1234") {
router.push("/dashboard");
} else {
alert("Invalid email or password");
}
};

return (
<div className="flex h-screen items-center justify-center">
<form onSubmit={handleSubmit} className="flex w-80 flex-col items-center">
{/* Title */}
<h1 className="font-display mb-4 block text-5xl leading-none text-lion md:text-8xl">
login
</h1>

{/* Email */}
<input
type="text"
placeholder="Email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="mb-4 w-full rounded-full border px-4 py-2 focus:ring-2 focus:outline-none"
/>

{/* Password */}
<input
type="password"
placeholder="Password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="mb-4 w-full rounded-full border px-4 py-2 focus:ring-2 focus:outline-none"
/>

<div className="flex w-full items-center justify-between">
{/* Forgot Password */}
<Link href="/forgot-password" className="mb-8 text-xs">
Forgot Password?
</Link>

{/* Login Button */}
<button
type="submit"
className="mb-2 cursor-pointer gap-2 rounded-full bg-blue px-4 py-2 font-medium transition"
>
login
</button>
</div>

{/* Sign up Link */}
<div className="w-full text-right text-xs">
No account?{" "}
<Link href="/sign-up" className="cursor-pointer">
Sign up!
</Link>
</div>
</form>
</div>
);
}
88 changes: 88 additions & 0 deletions app/sign-up/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
"use client";

import React, { useState } from "react";
import Link from "next/link";
import { useRouter } from "next/navigation";

export default function Page() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [confirmPassword, setConfirmPassword] = useState("");
const router = useRouter();

const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
console.log("Sign up attempt:", {
email,
password,
confirmPassword,
});

// TODO: Replace with real sign up information
if (
email === "test" &&
password === "1234" &&
confirmPassword === password
) {
router.push("/dashboard");
} else {
alert("WOMP WOMP NO ACCOUNT FOR YOU");
}
};

return (
<div className="flex h-screen items-center justify-center">
<form onSubmit={handleSubmit} className="flex w-80 flex-col items-center">
{/* Title */}
<h1 className="font-display mb-4 block text-5xl leading-none text-lion md:text-8xl">
sign up
</h1>

{/* Email */}
<input
type="text"
placeholder="Email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="mb-4 w-full rounded-full border px-4 py-2 focus:ring-2 focus:outline-none"
/>

{/* Password */}
<input
type="password"
placeholder="Password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="mb-4 w-full rounded-full border px-4 py-2 focus:ring-2 focus:outline-none"
/>

{/* Retype Password */}
<input
type="password"
placeholder="Confirm Password"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
className="mb-4 w-full rounded-full border px-4 py-2 focus:ring-2 focus:outline-none"
/>

{/* Sign Up Button */}
<div className="flex w-full">
<button
type="submit"
className="mb-2 ml-auto cursor-pointer gap-2 rounded-full bg-blue px-4 py-2 font-medium transition"
>
sign up
</button>
</div>

{/* Login Link */}
<div className="w-full text-right text-xs">
Already have an account?{" "}
<Link href="/login" className="cursor-pointer">
Login!
</Link>
</div>
</form>
</div>
);
}
2 changes: 1 addition & 1 deletion app/ui/components/hamburger-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function HamburgerMenu() {
</Link>
</li>
<li>
<Link href="/" className="tracking-wide">
<Link href="/login" className="tracking-wide">
Login/Signup
</Link>
</li>
Expand Down