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 [itemFormPopup, setItemFormPopup] = useState<ItemFormPopupProps | null>(null);
|
||||||
|
|
||||||
|
const [embedded, setEmbedded] = useState<boolean>(true)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let params = new URLSearchParams(location.search);
|
let params = new URLSearchParams(location.search);
|
||||||
let urlPosition = params.get("position");
|
let urlPosition = params.get("position");
|
||||||
|
let embedded = params.get("embedded");
|
||||||
|
embedded != "true" && setEmbedded(false)
|
||||||
}, [location]);
|
}, [location]);
|
||||||
|
|
||||||
const onEachFeature = (feature: Feature<GeoJSONGeometry, any>, layer: L.Layer) => {
|
const onEachFeature = (feature: Feature<GeoJSONGeometry, any>, layer: L.Layer) => {
|
||||||
@ -83,7 +87,9 @@ function UtopiaMap({
|
|||||||
<TagsControl />
|
<TagsControl />
|
||||||
</Control>
|
</Control>
|
||||||
<Control position='bottomLeft' zIndex="999" absolute>
|
<Control position='bottomLeft' zIndex="999" absolute>
|
||||||
<QuestControl></QuestControl>
|
{!embedded && (
|
||||||
|
<QuestControl></QuestControl>
|
||||||
|
)}
|
||||||
<LayerControl></LayerControl>
|
<LayerControl></LayerControl>
|
||||||
</Control>
|
</Control>
|
||||||
<TileLayer
|
<TileLayer
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user