diff --git a/src/renderer/src/components/GameCard/index.tsx b/src/renderer/src/components/GameCard/index.tsx index 9c3f166..95a709d 100644 --- a/src/renderer/src/components/GameCard/index.tsx +++ b/src/renderer/src/components/GameCard/index.tsx @@ -7,14 +7,14 @@ import { Game } from "@renderer/types"; const GameCard = ({ title, path, is_running, img_cover, id, }: Game) => { const [status, setStatus] = useState(""); - function startGame(id) { - window.electron.launchApp(id, path); + async function startGame(id) { + window["Umbra"].startGame(id, path); } useEffect(() => { - window.electron.onAppStatus((status) => { + window["Umbra"].onAppStatus((status) => { if (status.id === id) { - let newStatus = status.status === "started" ? "Lancé" : status.status === "closed" ? "" : status.status; + let newStatus = status.status === 1 ? "Lancé" : status.status === 0 ? "" : status.status; setStatus(newStatus); } });