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
+3 -3
View File
@@ -13,7 +13,7 @@ import { Programs } from "../Programs";
import { CreateProgramWork, isCreateProgramWork } from "../../Work/CreateProgramWork";
import { useRerender } from "../../ui/React/hooks";
export const ProgramsSeen: string[] = [];
export const ProgramsSeen = new Set<string>();
export function ProgramsRoot(): React.ReactElement {
useRerender(200);
@@ -35,9 +35,9 @@ export function ProgramsRoot(): React.ReactElement {
useEffect(() => {
programs.forEach((p) => {
if (ProgramsSeen.includes(p.name)) return;
ProgramsSeen.push(p.name);
ProgramsSeen.add(p.name);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const getHackingLevelRemaining = (lvl: number): number => {