mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
- changed: do not show QuestControl in embedded mode
This commit is contained in:
parent
fa85b372ca
commit
1f159ac836
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user