mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-06 07:37:56 +02:00
UI: Correct behavior of "back" button on faction augs page
Plus router refactoring
This commit is contained in:
committed by
GitHub
parent
9a0a843ffc
commit
1af01401d9
@@ -43,7 +43,7 @@ function toLocation(location: Location): void {
|
||||
} else if (location.name === LocationName.WorldStockExchange) {
|
||||
Router.toPage(Page.StockMarket);
|
||||
} else {
|
||||
Router.toLocation(location);
|
||||
Router.toPage(Page.Location, { location });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,11 +151,10 @@ export function CompanyLocation(props: IProps): React.ReactElement {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
const loc = location;
|
||||
if (!loc.infiltrationData)
|
||||
if (!location.infiltrationData)
|
||||
throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);
|
||||
|
||||
Router.toInfiltration(loc);
|
||||
Router.toPage(Page.Infiltration, { location });
|
||||
}
|
||||
|
||||
function work(e: React.MouseEvent<HTMLElement>): void {
|
||||
|
||||
Reference in New Issue
Block a user