fix create gang not working.

This commit is contained in:
Olivier Gagnon 2021-09-20 01:24:39 -04:00
parent 91c7ae53ef
commit 34313e8100
2 changed files with 8 additions and 3 deletions

@ -4,16 +4,19 @@
import React from "react"; import React from "react";
import { removePopup } from "../../ui/React/createPopup"; import { removePopup } from "../../ui/React/createPopup";
import { StdButton } from "../../ui/React/StdButton"; import { StdButton } from "../../ui/React/StdButton";
import { use } from "../../ui/Context"; import { IRouter } from "../../ui/Router";
import { IPlayer } from "../../PersonObjects/IPlayer";
interface ICreateGangPopupProps { interface ICreateGangPopupProps {
popupId: string; popupId: string;
facName: string; facName: string;
player: IPlayer;
router: IRouter;
} }
export function CreateGangPopup(props: ICreateGangPopupProps): React.ReactElement { export function CreateGangPopup(props: ICreateGangPopupProps): React.ReactElement {
const player = use.Player(); const player = props.player;
const router = use.Router(); const router = props.router;
const combatGangText = const combatGangText =
"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. " + "This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. " +
"Compared to hacking gangs, progression with combat gangs can be more difficult as territory management " + "Compared to hacking gangs, progression with combat gangs can be more difficult as territory management " +

@ -80,6 +80,8 @@ export function FactionRoot(props: IProps): React.ReactElement {
createPopup(popupId, CreateGangPopup, { createPopup(popupId, CreateGangPopup, {
popupId: popupId, popupId: popupId,
facName: faction.name, facName: faction.name,
player: player,
router: router,
}); });
} }