From cad50649aa45f781941ec004a2a2549cd4ac0d28 Mon Sep 17 00:00:00 2001 From: Moyasee Date: Thu, 25 Sep 2025 18:07:38 +0300 Subject: [PATCH] fix: single pinned game not visible in profile --- .../profile-content/profile-content.tsx | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/renderer/src/pages/profile/profile-content/profile-content.tsx b/src/renderer/src/pages/profile/profile-content/profile-content.tsx index 7b1ac8e2..68e7fecf 100644 --- a/src/renderer/src/pages/profile/profile-content/profile-content.tsx +++ b/src/renderer/src/pages/profile/profile-content/profile-content.tsx @@ -82,13 +82,14 @@ export function ProfileContent() { const hasGames = libraryGames.length > 0; const hasPinnedGames = pinnedGames.length > 0; + const hasAnyGames = hasGames || hasPinnedGames; - const shouldShowRightContent = hasGames || userProfile.friends.length > 0; + const shouldShowRightContent = hasAnyGames || userProfile.friends.length > 0; return (
- {!hasGames && ( + {!hasAnyGames && (
@@ -98,7 +99,7 @@ export function ProfileContent() {
)} - {hasGames && ( + {hasAnyGames && ( <> {hasPinnedGames && (
@@ -121,24 +122,28 @@ export function ProfileContent() {
)} -
-

{t("library")}

- {userStats && ( - {numberFormatter.format(userStats.libraryCount)} - )} -
+ {hasGames && ( +
+
+

{t("library")}

+ {userStats && ( + {numberFormatter.format(userStats.libraryCount)} + )} +
-
    - {libraryGames?.map((game) => ( - - ))} -
+
    + {libraryGames?.map((game) => ( + + ))} +
+
+ )} )}