Skip to content

Commit

Permalink
fix: use new Button api, don't disable button on game running and don…
Browse files Browse the repository at this point in the history
…'t use start command
  • Loading branch information
Ludea committed Feb 19, 2025
1 parent 576ef05 commit 7cb55c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect, useContext } from "react";
import LinearProgress from "@mui/material/LinearProgress";
import LoadingButton from "@mui/lab/LoadingButton";
import Button from "@mui/material/Button";
import Grid from "@mui/material/Grid2";
import Paper from "@mui/material/Paper";
import CircularProgress from "@mui/material/CircularProgress";
Expand Down Expand Up @@ -175,7 +175,7 @@ function Footer() {
const spawn = () => {
const command = Command.create(shell, [
...arg,
"start ".concat(workspacePath, "/", gameName),
workspacePath.concat("/", gameName),
]);

command
Expand Down Expand Up @@ -223,10 +223,10 @@ function Footer() {
) : null}
</Grid>
<Grid>
<LoadingButton
<Button
variant="contained"
color="primary"
disabled={gameRunning}
//disabled={gameRunning}
loading={gameLoading}
sx={{
"&.Mui-disabled": {
Expand Down Expand Up @@ -265,7 +265,7 @@ function Footer() {
}}
>
{gameState !== "installed" ? "Install" : "Play"}
</LoadingButton>
</Button>
</Grid>
{gameState === "installing" ? (
<Grid
Expand Down

0 comments on commit 7cb55c9

Please sign in to comment.