Corrected the logic
This commit is contained in:
parent
64f4ca0dff
commit
c82b287c8a
|
@ -331,7 +331,7 @@ const CodeRunner = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChange = () => {
|
const handleChange = () => {
|
||||||
if (isConnected) {
|
if (status != "idle") {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
connect();
|
connect();
|
||||||
|
@ -389,7 +389,7 @@ const CodeRunner = (props) => {
|
||||||
<Chip
|
<Chip
|
||||||
size="small"
|
size="small"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="info"
|
color={status != "idle" ? "info" : "default"}
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: "0.7rem",
|
fontSize: "0.7rem",
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
|
|
Loading…
Reference in New Issue