BUGFIX: Multiple problems with Job tab (#1976)

This commit is contained in:
catloversg
2025-03-01 03:52:08 +07:00
committed by GitHub
parent f54f7b932c
commit 91b68db1fe
8 changed files with 92 additions and 69 deletions
+1 -1
View File
@@ -31,6 +31,7 @@ export enum SimplePage {
StockMarket = "Stock Market",
Terminal = "Terminal",
Travel = "Travel",
Job = "Job",
Work = "Work",
BladeburnerCinematic = "Bladeburner Cinematic",
Loading = "Loading",
@@ -43,7 +44,6 @@ export enum SimplePage {
export enum ComplexPage {
BitVerse = "BitVerse",
Infiltration = "Infiltration",
Job = "Job",
Faction = "Faction",
FactionAugmentations = "Faction Augmentations",
ScriptEditor = "Script Editor",
+1 -1
View File
@@ -337,7 +337,7 @@ export function GameRoot(): React.ReactElement {
mainPage = <JobRoot />;
break;
case Page.Location: {
mainPage = <GenericLocation loc={pageWithContext.location} showBackButton={true} />;
mainPage = <GenericLocation location={pageWithContext.location} showBackButton={true} />;
break;
}
case Page.Options: {
-3
View File
@@ -14,8 +14,6 @@ export type PageContext<T extends Page> = T extends ComplexPage.BitVerse
? { flume: boolean; quick: boolean }
: T extends ComplexPage.Infiltration
? { location: Location }
: T extends ComplexPage.Job
? { location: Location }
: T extends ComplexPage.Faction
? { faction: Faction }
: T extends ComplexPage.FactionAugmentations
@@ -33,7 +31,6 @@ export type PageContext<T extends Page> = T extends ComplexPage.BitVerse
export type PageWithContext =
| ({ page: ComplexPage.BitVerse } & PageContext<ComplexPage.BitVerse>)
| ({ page: ComplexPage.Infiltration } & PageContext<ComplexPage.Infiltration>)
| ({ page: ComplexPage.Job } & PageContext<ComplexPage.Job>)
| ({ page: ComplexPage.Faction } & PageContext<ComplexPage.Faction>)
| ({ page: ComplexPage.FactionAugmentations } & PageContext<ComplexPage.FactionAugmentations>)
| ({ page: ComplexPage.ScriptEditor } & PageContext<ComplexPage.ScriptEditor>)
+2 -2
View File
@@ -428,11 +428,11 @@ export function WorkInProgressRoot(): React.ReactElement {
buttons: {
cancel: () => {
Player.finishWork(true);
Router.toPage(Page.Job, { location: Locations[comp.name] });
Router.toPage(Page.Job);
},
unfocus: () => {
Player.stopFocusing();
Router.toPage(Page.Job, { location: Locations[comp.name] });
Router.toPage(Page.Job);
},
},
title: (