Skip to content

Commit 7b0a299

Browse files
committed
Comment notes on how to set profile view of current logged in user vs profile view of selected user
1 parent 527dc56 commit 7b0a299

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

client/src/pages/user_profile_page.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Head from "next/head";
22
import Link from "next/link";
3-
import { useEffect,useState } from "react";
3+
import { useEffect, useState } from "react";
44

55
import User_Navbar from "../components/ui/user_navbar";
66
import { useAuth } from "../context/AuthContext";
@@ -68,6 +68,10 @@ export default function UserPage() {
6868
{/* User details */}
6969
<h2 style={{ marginTop: "25px", fontSize: "28px" }}>
7070
{user?.username}
71+
72+
{/* Should instead be an api call for friends name of curent user profile viewed,
73+
not necessarily the current logged in user, update later in backend and frontend,
74+
(could update existing views with permissions of auth allowing interactivity ?? ) */}
7175
</h2>
7276
<p style={{ color: "#666", marginBottom: "40px", fontSize: "18px" }}>
7377
Perth, Western Australia
@@ -85,9 +89,21 @@ export default function UserPage() {
8589
<Link href="./user_friends">
8690
<Stat label="Friends" value={friends.length} />
8791
</Link>
92+
93+
{/* Should instead be an api call for friends number of curent user profile viewed,
94+
not necessarily the current logged in user, update later in backend and frontend,
95+
and link should also point to specific page for friends of user being viewed
96+
(could update existing views with permissions of auth allowing interactivity ?? ) */}
97+
8898
<Stat label="Mutual friends" value={0} />
8999
<Stat label="Clubs joined" value={0} />
90100
</div>
101+
{/* { user === profile_user (
102+
103+
) : (
104+
<Stat label="Mutual friends" value={0} />
105+
)
106+
} */}
91107
</div>
92108
</div>
93109
</>

0 commit comments

Comments
 (0)