mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Prettier & slight fix
Streamlined DummyGrid to behave like Grid. Fixed a bad practice issue with ActiveFragmentSummary that displayed an error message in the webbrowser devtool console.
This commit is contained in:
parent
ce5fdb00af
commit
5b4addbb21
@ -66,7 +66,7 @@ export function ActiveFragmentSummary(props: IProps): React.ReactElement {
|
||||
</TableRow>
|
||||
{summary.map((entry) => {
|
||||
return (
|
||||
<TableRow>
|
||||
<TableRow key={entry.type}>
|
||||
<TableCell sx={{ borderBottom: "none", p: 0, m: 0 }}>
|
||||
<Typography>
|
||||
{entry.coordinate.map((coord) => {
|
||||
|
@ -13,7 +13,6 @@ interface IProps {
|
||||
|
||||
export function DummyGrid(props: IProps): React.ReactElement {
|
||||
const gift = new DummyGift(props.width, props.height, props.fragments);
|
||||
const activeGrid = calculateGrid(gift);
|
||||
const ghostGrid = zeros([props.width, props.height]);
|
||||
return (
|
||||
<Box>
|
||||
@ -21,7 +20,6 @@ export function DummyGrid(props: IProps): React.ReactElement {
|
||||
<Grid
|
||||
width={props.width}
|
||||
height={props.height}
|
||||
activeGrid={activeGrid}
|
||||
ghostGrid={ghostGrid}
|
||||
gift={gift}
|
||||
enter={() => undefined}
|
||||
|
@ -32,7 +32,7 @@ function randomColor(fragment: ActiveFragment): string {
|
||||
}
|
||||
|
||||
export function Grid(props: IProps): React.ReactElement {
|
||||
const activeGrid = calculateGrid(props.gift)
|
||||
const activeGrid = calculateGrid(props.gift);
|
||||
|
||||
function color(worldX: number, worldY: number): string {
|
||||
if (props.ghostGrid[worldX][worldY] && activeGrid[worldX][worldY]) return "red";
|
||||
|
Loading…
Reference in New Issue
Block a user