From e5acd10c86f4fa51e36094521d2f20ba09576b30 Mon Sep 17 00:00:00 2001 From: phyzical Date: Wed, 9 Mar 2022 22:14:42 +0800 Subject: [PATCH] moved to only apply when working for faction --- src/ui/WorkInProgressRoot.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index 2490402a9..130df6067 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -36,16 +36,16 @@ export function WorkInProgressRoot(): React.ReactElement { 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) { + if (!faction) { + return <> + + Sorry, You have not joined the faction {faction} yet! + + + + } + function cancel(): void { router.toFaction(faction); player.finishFactionWork(true); @@ -135,7 +135,6 @@ export function WorkInProgressRoot(): React.ReactElement { } function unfocus(): void { - router.toFaction(faction); router.toCity(); player.stopFocusing(); }