diff --git a/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx b/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx index 2413cb9e..e55772c6 100644 --- a/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx +++ b/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx @@ -84,7 +84,10 @@ export function EditGameModal({ setDefaultUrls({ icon: shopDetails?.assets?.iconUrl || game.iconUrl || null, logo: shopDetails?.assets?.logoImageUrl || game.logoImageUrl || null, - hero: shopDetails?.assets?.libraryHeroImageUrl || game.libraryHeroImageUrl || null, + hero: + shopDetails?.assets?.libraryHeroImageUrl || + game.libraryHeroImageUrl || + null, }); }, [shopDetails] @@ -119,11 +122,11 @@ export function EditGameModal({ }; const setAssetPath = (assetType: AssetType, path: string): void => { - setAssetPaths(prev => ({ ...prev, [assetType]: path })); + setAssetPaths((prev) => ({ ...prev, [assetType]: path })); }; const setAssetDisplayPath = (assetType: AssetType, path: string): void => { - setAssetDisplayPaths(prev => ({ ...prev, [assetType]: path })); + setAssetDisplayPaths((prev) => ({ ...prev, [assetType]: path })); }; const getDefaultUrl = (assetType: AssetType): string | null => { @@ -293,7 +296,9 @@ export function EditGameModal({ // Helper function to prepare custom game assets const prepareCustomGameAssets = (game: LibraryGame | Game) => { const iconUrl = assetPaths.icon ? `local:${assetPaths.icon}` : game.iconUrl; - const logoImageUrl = assetPaths.logo ? `local:${assetPaths.logo}` : game.logoImageUrl; + const logoImageUrl = assetPaths.logo + ? `local:${assetPaths.logo}` + : game.logoImageUrl; const libraryHeroImageUrl = assetPaths.hero ? `local:${assetPaths.hero}` : game.libraryHeroImageUrl; diff --git a/src/renderer/src/pages/profile/profile-content/user-library-game-card.tsx b/src/renderer/src/pages/profile/profile-content/user-library-game-card.tsx index ec7736e0..251a3bc7 100644 --- a/src/renderer/src/pages/profile/profile-content/user-library-game-card.tsx +++ b/src/renderer/src/pages/profile/profile-content/user-library-game-card.tsx @@ -44,7 +44,6 @@ export function UserLibraryGameCard({ const [isTooltipHovered, setIsTooltipHovered] = useState(false); const [isPinning, setIsPinning] = useState(false); - const getStatsItemCount = useCallback(() => { let statsCount = 1; if (game.achievementsPointsEarnedSum > 0) statsCount++; @@ -91,15 +90,15 @@ export function UserLibraryGameCard({ const hours = minutes / 60; const hoursKey = isShort ? "amount_hours_short" : "amount_hours"; - const hoursAmount = isShort ? Math.floor(hours) : numberFormatter.format(hours); - + const hoursAmount = isShort + ? Math.floor(hours) + : numberFormatter.format(hours); + return t(hoursKey, { amount: hoursAmount }); }, [numberFormatter, t] ); - - const toggleGamePinned = async () => { setIsPinning(true); @@ -162,7 +161,7 @@ export function UserLibraryGameCard({ )} )} -