From 2a8b1c2116b6507d9ffca84f55471fc567bee6a9 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Tue, 21 Sep 2021 17:38:51 -0400 Subject: [PATCH] Fix corp not moving --- src/Corporation/ui/CreateCorporationPopup.tsx | 4 ++++ src/Locations/ui/SpecialLocation.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Corporation/ui/CreateCorporationPopup.tsx b/src/Corporation/ui/CreateCorporationPopup.tsx index b65af31ad..247fa90a3 100644 --- a/src/Corporation/ui/CreateCorporationPopup.tsx +++ b/src/Corporation/ui/CreateCorporationPopup.tsx @@ -4,10 +4,12 @@ import { IPlayer } from "../../PersonObjects/IPlayer"; import { removePopup } from "../../ui/React/createPopup"; import { Money } from "../../ui/React/Money"; import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { IRouter } from "../../ui/Router"; interface IProps { player: IPlayer; popupId: string; + router: IRouter; } export function CreateCorporationPopup(props: IProps): React.ReactElement { @@ -40,6 +42,7 @@ export function CreateCorporationPopup(props: IProps): React.ReactElement { "and manage your company in the City.", ); removePopup(props.popupId); + props.router.toCorporation(); } function seed(): void { @@ -55,6 +58,7 @@ export function CreateCorporationPopup(props: IProps): React.ReactElement { "You can visit and manage your company in the City.", ); removePopup(props.popupId); + props.router.toCorporation(); } return ( diff --git a/src/Locations/ui/SpecialLocation.tsx b/src/Locations/ui/SpecialLocation.tsx index a6ab94feb..57dad3d75 100644 --- a/src/Locations/ui/SpecialLocation.tsx +++ b/src/Locations/ui/SpecialLocation.tsx @@ -41,6 +41,7 @@ export function SpecialLocation(props: IProps): React.ReactElement { createPopup(popupId, CreateCorporationPopup, { player: player, popupId: popupId, + router: router, }); }