mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
Format
This commit is contained in:
parent
725fb05bb3
commit
a6ee9a8c76
@ -1,11 +1,11 @@
|
|||||||
import React, {useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
|
|
||||||
interface baubleProps {
|
interface baubleProps {
|
||||||
callback: () => boolean;
|
callback: () => boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ConnectionBauble = (props: baubleProps): React.ReactElement => {
|
export const ConnectionBauble = (props: baubleProps): React.ReactElement => {
|
||||||
const [connection, setConnection] = useState(props.callback())
|
const [connection, setConnection] = useState(props.callback());
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
@ -13,9 +13,5 @@ export const ConnectionBauble = (props: baubleProps): React.ReactElement => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return <div className="ConnectionBauble">{connection ? "Connected" : "Disconnected"}</div>;
|
||||||
<div className="ConnectionBauble">
|
};
|
||||||
{connection? "Connected" : "Disconnected"}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
@ -9,7 +9,7 @@ import { GameOptionsTab } from "../GameOptionsTab";
|
|||||||
import { GameOptionsPage } from "./GameOptionsPage";
|
import { GameOptionsPage } from "./GameOptionsPage";
|
||||||
import { OptionsSlider } from "./OptionsSlider";
|
import { OptionsSlider } from "./OptionsSlider";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import { ConnectionBaub, ConnectionBauble } from "./ConnectionBauble";
|
import { ConnectionBauble } from "./ConnectionBauble";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
currentTab: GameOptionsTab;
|
currentTab: GameOptionsTab;
|
||||||
|
Loading…
Reference in New Issue
Block a user