diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index d43843c85..2490402a9 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -31,9 +31,20 @@ export function WorkInProgressRoot(): React.ReactElement { const id = setInterval(rerender, CONSTANTS.MilliPerCycle); return () => clearInterval(id); }, []); + const player = use.Player(); const router = use.Router(); + const faction = Factions[player.currentWorkFactionName]; + if (!faction) { + return <> + + Sorry, You have not joined the faction {faction} yet! + + + + } + if (player.workType == CONSTANTS.WorkTypeFaction) { function cancel(): void { router.toFaction(faction);