From 1f159ac8368578e5543c88a0d707046a653d8f60 Mon Sep 17 00:00:00 2001 From: Sebastian Stein Date: Tue, 25 Jun 2024 13:52:40 +0200 Subject: [PATCH] - changed: do not show QuestControl in embedded mode --- src/Components/Map/UtopiaMap.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 09fb6e1e..278949a6 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -62,9 +62,13 @@ function UtopiaMap({ const [itemFormPopup, setItemFormPopup] = useState(null); + const [embedded, setEmbedded] = useState(true) + useEffect(() => { let params = new URLSearchParams(location.search); let urlPosition = params.get("position"); + let embedded = params.get("embedded"); + embedded != "true" && setEmbedded(false) }, [location]); const onEachFeature = (feature: Feature, layer: L.Layer) => { @@ -83,7 +87,9 @@ function UtopiaMap({ - + {!embedded && ( + + )}