mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 03:32:13 +00:00
feat: get totalPlayTimeInSeconds from api
This commit is contained in:
parent
92a3061f8d
commit
9a1b42a29f
2 changed files with 2 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -263,6 +263,7 @@ export interface UserProfile {
|
|||
id: string;
|
||||
displayName: string;
|
||||
profileImageUrl: string | null;
|
||||
totalPlayTimeInSeconds: number;
|
||||
libraryGames: UserGame[];
|
||||
recentGames: UserGame[];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue