mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 14:27:03 +02:00
MISC: enforce eslint react checks (#640)
This commit is contained in:
committed by
GitHub
parent
91bfb154b6
commit
1d5a735941
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user