Internal refactoring of Router (#241)

This commit is contained in:
David Walker
2022-12-04 00:14:06 -08:00
committed by GitHub
parent 897a1fbc8e
commit 8d793ea271
35 changed files with 292 additions and 383 deletions
+2 -1
View File
@@ -21,6 +21,7 @@ import ClearAllIcon from "@mui/icons-material/ClearAll";
import { Settings } from "../../Settings/Settings";
import { Router } from "../GameRoot";
import { Page } from "../Router";
import { Player } from "@player";
import { StatsProgressOverviewCell } from "./StatsProgressBar";
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
@@ -140,7 +141,7 @@ function WorkInProgressOverview({
function Work(): React.ReactElement {
const onClickFocus = (): void => {
Player.startFocusing();
Router.toWork();
Router.toPage(Page.Work);
};
if (Player.currentWork === null || Player.focus) return <></>;