From 5c4ddd9b7abe33991884c67c2a89f3f7e5801889 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 16 Oct 2024 01:08:10 -0300 Subject: [PATCH] feat: profile active subscription --- .../profile-content/profile-content.tsx | 76 ++++++++++--------- src/types/index.ts | 1 + 2 files changed, 41 insertions(+), 36 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 3509584e..99e09889 100644 --- a/src/renderer/src/pages/profile/profile-content/profile-content.tsx +++ b/src/renderer/src/pages/profile/profile-content/profile-content.tsx @@ -17,6 +17,7 @@ import { RecentGamesBox } from "./recent-games-box"; import { UserGame } from "@types"; import { buildGameAchievementPath, + buildGameDetailsPath, formatDownloadProgress, } from "@renderer/helpers"; import { MAX_MINUTES_TO_SHOW_IN_PLAYTIME } from "@renderer/constants"; @@ -45,11 +46,12 @@ export function ProfileContent() { }, [userProfile]); const buildUserGameDetailsPath = (game: UserGame) => { - // TODO: check if user has hydra cloud - // buildGameDetailsPath({ - // ...game, - // objectId: game.objectId, - // }); + if (!userProfile?.hasActiveSubscription) { + return buildGameDetailsPath({ + ...game, + objectId: game.objectId, + }); + } const userParams = userProfile ? { @@ -172,53 +174,55 @@ export function ProfileContent() { {formatPlayTime(game.playTimeInSeconds)} -