From 6ff48605da99f1539082b4b84c6e95725f8dfef2 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:51:53 -0300 Subject: [PATCH] feat: show friends from response --- src/renderer/src/pages/user/user-content.tsx | 139 +++++++++---------- 1 file changed, 64 insertions(+), 75 deletions(-) diff --git a/src/renderer/src/pages/user/user-content.tsx b/src/renderer/src/pages/user/user-content.tsx index aca7cc60..5d0de1c5 100644 --- a/src/renderer/src/pages/user/user-content.tsx +++ b/src/renderer/src/pages/user/user-content.tsx @@ -1,4 +1,4 @@ -import { UserFriend, UserGame, UserProfile } from "@types"; +import { UserGame, UserProfile } from "@types"; import cn from "classnames"; import * as styles from "./user.css"; @@ -79,7 +79,7 @@ export function UserContent({ }; const handleOnClickFriend = (userId: string) => { - console.log(userId); + navigate(`/user/${userId}`); }; const handleConfirmSignout = async () => { @@ -326,86 +326,75 @@ export function UserContent({ -
-
-

{t("friends")}

+ {(isMe || + (userProfile.friends && userProfile.friends.length > 0)) && ( +
+
+

{t("friends")}

+ +
+ {isMe && ( + + )} +
- {isMe && ( - - )} -
- -
- {( - [ - { - id: "", - displayName: "Punheta Master 123123123123123123", - profileImageUrl: - "https://cdn.discordapp.com/avatars/1239959140785455295/4aff4b901c7a9f5f814b4379b6cfd58a.webp", - }, - { - id: "", - displayName: "Hydra Launcher", - profileImageUrl: null, - }, - ] as UserFriend[] - ).map((friend) => { - return ( - - ); - })} +

+ {friend.displayName} +

+ + ); + })} +
-
+ )}