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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Link from "next/link";

export default function ButtonGoUserPage() {
export default function ButtonGoUserProfilePage() {
return (
<Link href="/user_page">
<Link href="/user_profile_page">
<button
style={{
padding: "10px 20px",
Expand All @@ -14,7 +14,7 @@ export default function ButtonGoUserPage() {
fontSize: "1.1em",
}}
>
Go to User Page
Go to User Profile Page
</button>
</Link>
);
Expand Down
60 changes: 60 additions & 0 deletions client/src/components/ui/user_navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import Link from "next/link";

export default function User_Navbar() {
return (
<nav
style={{
height: "64px",
backgroundColor: "#ffffff",
display: "flex",
alignItems: "center",
padding: "0 24px",
borderBottom: "1px solid #e5e5e5",
}}
>
{/* Logo */}
<div style={{ fontWeight: "bold", marginRight: "24px" }}>Logo</div>

{/* Search bar */}
<input
type="text"
placeholder="Search"
style={{
padding: "8px 12px",
borderRadius: "8px",
border: "1px solid #ccc",
width: "240px",
marginRight: "32px",
}}
/>

{/* Nav links */}
<div style={{ display: "flex", gap: "24px" }}>
<Link href="/">Home</Link>
<Link href="#">My Clubs</Link>
<Link href="#">My Borrowings</Link>
<Link href="#">Friends</Link>
</div>

{/* Spacer */}
<div style={{ flex: 1 }} />

{/* User avatar */}
<div
style={{
width: "36px",
height: "36px",
borderRadius: "50%",
backgroundColor: "#5b84b1",
color: "white",
display: "flex",
alignItems: "center",
justifyContent: "center",
fontWeight: "bold",
}}
>
U
</div>
</nav>
);
}
6 changes: 3 additions & 3 deletions client/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// this is the path to this page
// src/pages/index.tsx

import ButtonGoUserDashboard from "../components/ui/button_go_user_dashboard";
import ButtonGoOrganizationDashboard from "../components/ui/button_go_organization_dashboard";
import ButtonGoUserPage from "../components/ui/button_go_user_page";
import ButtonGoUserDashboard from "../components/ui/button_go_user_dashboard";
import ButtonGoUserProfilePage from "../components/ui/button_go_user_profile_page";

// this is a react functional component
// it returns a html element that will render the jsx inside it
Expand All @@ -29,7 +29,7 @@ const LandingPage = () => {

<ButtonGoOrganizationDashboard />
<ButtonGoUserDashboard />
<ButtonGoUserPage />
<ButtonGoUserProfilePage />
</div>
);
};
Expand Down
18 changes: 0 additions & 18 deletions client/src/pages/user_page.tsx

This file was deleted.

89 changes: 89 additions & 0 deletions client/src/pages/user_profile_page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import Head from "next/head";

import User_Navbar from "../components/ui/user_navbar";

export default function UserPage() {
return (
<>
<Head>
<title>User Profile Page</title>
</Head>

{/* Navbar refactor */}
<User_Navbar />

<div
style={{
backgroundColor: "#e6e6e6",
minHeight: "100vh",
paddingTop: "64px",
display: "flex",
justifyContent: "center",
}}
>
{/* Profile card */}
<div
style={{
backgroundColor: "#ffffff",
width: "900px",
height: "500px",
borderRadius: "8px",
padding: "48px",
textAlign: "center",
marginTop: "40px",
boxShadow: "0 2px 6px rgba(0,0,0,0.08)",
}}
>
{/* Avatar */}
<div
style={{
width: "120px",
height: "120px",
borderRadius: "50%",
backgroundColor: "#5b84b1",
color: "white",
display: "flex",
alignItems: "center",
justifyContent: "center",
fontSize: "48px",
margin: "-100px auto 16px",
}}
>
U
</div>

{/* User details */}
<h2 style={{ marginTop: "25px", fontSize: "28px" }}>
New User 12345678
</h2>
<p style={{ color: "#666", marginBottom: "40px", fontSize: "18px" }}>
Perth, Western Australia
</p>

{/* Stats */}
<div
style={{
display: "flex",
justifyContent: "space-between",
padding: "40px 40px",
}}
>
<Stat label="Borrowed" value={0} />
<Stat label="Friends" value={0} />
<Stat label="Mutual friends" value={0} />
<Stat label="Clubs joined" value={0} />
</div>
</div>
</div>
</>
);
}

function Stat({ label, value }: { label: string; value: number }) {
return (
<div>
<div style={{ fontSize: "45px", marginBottom: "8px" }}>{value}</div>
<div style={{ color: "#666", fontSize: "18px" }}>{label}</div>
</div>
);
}
Loading