mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-17 16:33:55 +00:00
Update game-card.tsx
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user