From 54d137e3aea586f9593f57b9a63e19fbf3e4513c Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 16 Jun 2024 18:39:28 -0300 Subject: [PATCH] fix warning --- src/renderer/src/app.tsx | 2 +- src/renderer/src/pages/user/user-content.tsx | 4 ++-- src/types/index.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/app.tsx b/src/renderer/src/app.tsx index 0f86a6a0..cf510df0 100644 --- a/src/renderer/src/app.tsx +++ b/src/renderer/src/app.tsx @@ -83,7 +83,7 @@ export function App() { return () => { listeners.forEach((unsubscribe) => unsubscribe()); }; - }, []); + }, [clearUserAuth, updateUserAuth]); const handleSearch = useCallback( (query: string) => { diff --git a/src/renderer/src/pages/user/user-content.tsx b/src/renderer/src/pages/user/user-content.tsx index 23b998df..6b6eb39e 100644 --- a/src/renderer/src/pages/user/user-content.tsx +++ b/src/renderer/src/pages/user/user-content.tsx @@ -1,4 +1,4 @@ -import { ProfileGame, UserProfile } from "@types"; +import { UserGame, UserProfile } from "@types"; import cn from "classnames"; import * as styles from "./user.css"; import { SPACING_UNIT, vars } from "@renderer/theme.css"; @@ -49,7 +49,7 @@ export const UserContent = ({ userProfile }: ProfileContentProps) => { return t("amount_hours", { amount: numberFormatter.format(hours) }); }; - const handleGameClick = (game: ProfileGame) => { + const handleGameClick = (game: UserGame) => { navigate(buildGameDetailsPath(game)); }; diff --git a/src/types/index.ts b/src/types/index.ts index c95f16d7..acb8d10f 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -85,7 +85,7 @@ export interface CatalogueEntry { repacks: GameRepack[]; } -export interface ProfileGame { +export interface UserGame { objectID: string; shop: GameShop; title: string; @@ -254,8 +254,8 @@ export interface UserProfile { id: string; displayName: string; profileImageUrl: string | null; - libraryGames: ProfileGame[]; - recentGames: ProfileGame[]; + libraryGames: UserGame[]; + recentGames: UserGame[]; } export interface DownloadSource {