diff --git a/src/renderer/src/pages/user/user-content.tsx b/src/renderer/src/pages/user/user-content.tsx index 55dcc17f..dd0f05d0 100644 --- a/src/renderer/src/pages/user/user-content.tsx +++ b/src/renderer/src/pages/user/user-content.tsx @@ -51,10 +51,7 @@ export function UserContent({ const { formatDistance, formatDiffInMillis } = useDate(); const formatPlayTime = () => { - const seconds = userProfile.libraryGames.reduce( - (acc, game) => acc + game.playTimeInSeconds, - 0 - ); + const seconds = userProfile.totalPlayTimeInSeconds const minutes = seconds / 60; if (minutes < MAX_MINUTES_TO_SHOW_IN_PLAYTIME) { diff --git a/src/types/index.ts b/src/types/index.ts index c1da0d08..915e4ae7 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -263,6 +263,7 @@ export interface UserProfile { id: string; displayName: string; profileImageUrl: string | null; + totalPlayTimeInSeconds: number; libraryGames: UserGame[]; recentGames: UserGame[]; }