Skip to content

Commit

Permalink
Merge pull request #76 from game-node-app/dev
Browse files Browse the repository at this point in the history
Possible fix for wrong hours display in GameInfoPlaytimeItem
  • Loading branch information
Lamarcke authored Apr 19, 2024
2 parents 0b76d27 + b992c6f commit 4a3d9bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/game/info/playtime/GameInfoPlaytimeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ interface Props {
}

const GameInfoPlaytimeItem = ({ name, value, isLoading }: Props) => {
const valueHours = Math.ceil(value || 0 / 3600);
const valueToUse = value ?? 0;
const valueHours = Math.ceil(valueToUse / 3600);
return (
<Group className={"flex-nowrap gap-0 w-full"}>
<Stack
Expand All @@ -26,6 +27,7 @@ const GameInfoPlaytimeItem = ({ name, value, isLoading }: Props) => {
>
{valueHours} Hours
</Stack>
{isLoading && <Skeleton className={"w-1/2 h-10"} />}
</Group>
);
};
Expand Down

0 comments on commit 4a3d9bf

Please sign in to comment.