mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Update game-card.tsx
This commit is contained in:
parent
3156baf78e
commit
e804b92f30
1 changed files with 3 additions and 2 deletions
|
@ -9,6 +9,7 @@ import { Badge } from "../badge/badge";
|
|||
import { useCallback, useState } from "react";
|
||||
import { useFormat, useRepacks } from "@renderer/hooks";
|
||||
import { steamUrlBuilder } from "@shared";
|
||||
import { useMemo } from "react";
|
||||
|
||||
export interface GameCardProps
|
||||
extends React.DetailedHTMLProps<
|
||||
|
@ -44,8 +45,8 @@ export function GameCard({ game, ...props }: GameCardProps) {
|
|||
|
||||
const { numberFormatter } = useFormat();
|
||||
|
||||
const firstThreeRepackers = uniqueRepackers.slice(0, 3);
|
||||
const remainingCount = uniqueRepackers.length - 3;
|
||||
const firstThreeRepackers = useMemo(() => uniqueRepackers.slice(0, 3), [uniqueRepackers]);
|
||||
const remainingCount = useMemo(() => uniqueRepackers.length - 3, [uniqueRepackers]);
|
||||
|
||||
return (
|
||||
<button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue