From fa8d08107943e3af9372b3002051e4e70c167bb6 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Thu, 10 Jun 2021 20:07:40 +1000 Subject: [PATCH] Hide tile overlay immediately when closed --- src/components/tile/TilesOverlay.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/tile/TilesOverlay.js b/src/components/tile/TilesOverlay.js index 0577288..9d024b0 100644 --- a/src/components/tile/TilesOverlay.js +++ b/src/components/tile/TilesOverlay.js @@ -50,19 +50,21 @@ function TilesOverlay({ modalSize, children }) { const group = groups.find((group) => group.id === openGroupId); + if (!openGroupId) { + return null; + } + return ( <> - {openGroupId && ( - - )} +