From 2e31dda75ebce7945de47c972505d3307a66831f Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Sun, 9 Jan 2022 07:25:41 +1100 Subject: [PATCH] make Popups use variable like Sidebar does --- src/ui/GameRoot.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 2e06d4b68..068b99b32 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -302,25 +302,30 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme let mainPage = Cannot load; let withSidebar = true; + let withPopups = true; switch (page) { case Page.Recovery: { mainPage = ; withSidebar = false; + withPopups = false; break; } case Page.BitVerse: { mainPage = ; withSidebar = false; + withPopups = false; break } case Page.Infiltration: { mainPage = ; withSidebar = false; + withPopups = false; break; } case Page.BladeburnerCinematic: { mainPage = ; withSidebar = false; + withPopups = false; break; } case Page.Work: { @@ -474,7 +479,6 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme } } - const renderPopups = [Page.Recovery, Page.BitVerse, Page.Infiltration, Page.BladeburnerCinematic].includes(page); return ( @@ -495,7 +499,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme ) : mainPage } - {renderPopups && ( + {withPopups && ( <>