MISC: enforce eslint react checks (#640)

This commit is contained in:
Aleksei Bezrodnov
2023-06-27 04:29:44 +02:00
committed by GitHub
parent 91bfb154b6
commit 1d5a735941
68 changed files with 2062 additions and 601 deletions
+44
View File
@@ -0,0 +1,44 @@
import React from "react";
import Accordion from "@mui/material/Accordion";
import AccordionSummary from "@mui/material/AccordionSummary";
import AccordionDetails from "@mui/material/AccordionDetails";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import Typography from "@mui/material/Typography";
import { Player } from "@player";
import { Adjuster } from "./Adjuster";
// TODO: Update as additional BitNodes get implemented
export function EntropyDev(): React.ReactElement {
return (
<Accordion TransitionProps={{ unmountOnExit: true }}>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
<Typography>Entropy</Typography>
</AccordionSummary>
<AccordionDetails>
<Adjuster
label="Set entropy"
placeholder="entropy"
add={(num) => {
Player.entropy += num;
Player.applyEntropy(Player.entropy);
}}
subtract={(num) => {
Player.entropy -= num;
Player.applyEntropy(Player.entropy);
}}
tons={() => {
Player.entropy += 1e12;
Player.applyEntropy(Player.entropy);
}}
reset={() => {
Player.entropy = 0;
Player.applyEntropy(Player.entropy);
}}
/>
</AccordionDetails>
</Accordion>
);
}