From 08bdb4d34f04df1f4eff38bcc865c52dc9890511 Mon Sep 17 00:00:00 2001 From: Ludea Date: Tue, 15 Oct 2024 11:07:27 +0000 Subject: [PATCH] fix: some issue with incompatible type and props --- src/components/Footer.tsx | 5 ++--- src/components/Options.tsx | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index a7409502..699e30c9 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -45,8 +45,8 @@ function Footer() { const [gameState, setGameState] = useState("not_installed"); const [gameLoading, setGameLoading] = useState(false); const [gameRunning, setGameRunning] = useState(false); - const [workspacePath, setWorkspacePath] = useState(); - const [gameName, setGameName] = useState(); + const [workspacePath, setWorkspacePath] = useState(""); + const [gameName, setGameName] = useState(""); const [repositoryUrl, setRepositoryUrl] = useState(); const [downloadedBytesStart, setDownloadedBytesStart] = useState(""); const [downloadedBytesEnd, setDownloadedBytesEnd] = useState(""); @@ -224,7 +224,6 @@ function Footer() { {gameState === "not_installed" ? ( Download: {downloadedBytesStart} / {downloadedBytesEnd} @ diff --git a/src/components/Options.tsx b/src/components/Options.tsx index fd5b2b2b..060e76d6 100644 --- a/src/components/Options.tsx +++ b/src/components/Options.tsx @@ -30,8 +30,8 @@ function Options() { useEffect(() => { store.load().catch((err: string) => setGlobalError(err)); store - .get("game_url") - .then((value) => setGameURL(value)) + .get("game_url") + .then((value: string | null) => setGameURL(value)) .catch((err: string) => setGlobalError(err)); store .get("launcher_url")