Fix corp not moving

This commit is contained in:
Olivier Gagnon 2021-09-21 17:38:51 -04:00
parent 9a6b185141
commit 2a8b1c2116
2 changed files with 5 additions and 0 deletions

@ -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 (

@ -41,6 +41,7 @@ export function SpecialLocation(props: IProps): React.ReactElement {
createPopup(popupId, CreateCorporationPopup, {
player: player,
popupId: popupId,
router: router,
});
}