diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index 005aabafc..7a4c1802a 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -35,27 +35,29 @@ export function WorkInProgressRoot(): React.ReactElement { const player = use.Player(); const router = use.Router(); - const faction = Factions[player.currentWorkFactionName]; - if (!faction) { - return ( - - - - Something has gone wrong, you cannot work for {player.currentWorkFactionName || "(Faction not found)"} at this time. - - - - ) - } - if (player.workType == CONSTANTS.WorkTypeFaction) { + const faction = Factions[player.currentWorkFactionName]; if (!faction) { - return <> - - You have not joined {faction} yet! - - - + return ( + + + + Something has gone wrong, you cannot work for {player.currentWorkFactionName || "(Faction not found)"} at + this time. + + + + ); + } + if (!faction) { + return ( + <> + + You have not joined {faction} yet! + + + + ); } function cancel(): void {