- changed: do not show QuestControl in embedded mode

This commit is contained in:
Sebastian Stein 2024-06-25 13:52:40 +02:00
parent fa85b372ca
commit 1f159ac836

View File

@ -62,9 +62,13 @@ function UtopiaMap({
const [itemFormPopup, setItemFormPopup] = useState<ItemFormPopupProps | null>(null);
const [embedded, setEmbedded] = useState<boolean>(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<GeoJSONGeometry, any>, layer: L.Layer) => {
@ -83,7 +87,9 @@ function UtopiaMap({
<TagsControl />
</Control>
<Control position='bottomLeft' zIndex="999" absolute>
<QuestControl></QuestControl>
{!embedded && (
<QuestControl></QuestControl>
)}
<LayerControl></LayerControl>
</Control>
<TileLayer