From c6e4cd8c73b5c1c98ed8e337e1eb49974470da15 Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Fri, 16 Aug 2024 14:37:21 -0700 Subject: [PATCH] remove pro deps for geo --- .../AddLayerPanel/AddLayerPanel.component.jsx | 2 +- .../components/AddLayerPanel/LayersOptions.js | 4 ++-- .../components/AddLayerPanel/layersData.js | 2 -- .../components/GeoPanel/GeoPanel.component.jsx | 4 +--- src/editor/components/scenegraph/Toolbar.js | 14 -------------- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/editor/components/components/AddLayerPanel/AddLayerPanel.component.jsx b/src/editor/components/components/AddLayerPanel/AddLayerPanel.component.jsx index 5b580edf3..4f5c4989f 100644 --- a/src/editor/components/components/AddLayerPanel/AddLayerPanel.component.jsx +++ b/src/editor/components/components/AddLayerPanel/AddLayerPanel.component.jsx @@ -306,7 +306,7 @@ const AddLayerPanel = ({ onClose, isAddLayerPanelOpen }) => { }, []); const selectedCards = useMemo(() => { - if (selectedOption === 'Pro Layers') { + if (selectedOption === 'Street Layers') { return layersData; } else { return getSelectedMixinCards(groupedMixins, selectedOption); diff --git a/src/editor/components/components/AddLayerPanel/LayersOptions.js b/src/editor/components/components/AddLayerPanel/LayersOptions.js index 42e0f465a..bced90955 100644 --- a/src/editor/components/components/AddLayerPanel/LayersOptions.js +++ b/src/editor/components/components/AddLayerPanel/LayersOptions.js @@ -6,8 +6,8 @@ const LayersOptions = [ onClick: () => console.log('Models: Personal Vehicles') }, { - value: 'Pro Layers', - label: 'Pro Layers', + value: 'Street Layers', + label: 'Street Layers', onClick: () => console.log('Layers: Streets & Intersections') }, { diff --git a/src/editor/components/components/AddLayerPanel/layersData.js b/src/editor/components/components/AddLayerPanel/layersData.js index 6605c8953..1c1e5420f 100644 --- a/src/editor/components/components/AddLayerPanel/layersData.js +++ b/src/editor/components/components/AddLayerPanel/layersData.js @@ -14,7 +14,6 @@ const layersData = [ name: 'Mapbox 2D Aerial', img: 'ui_assets/cards/mapbox2d.jpg', icon: 'ui_assets/cards/icons/mapbox24.png', - requiresPro: true, description: 'Create entity with mapbox component, that accepts a long / lat and renders a plane with dimensions that (should be) at a correct scale.', id: 1, @@ -44,7 +43,6 @@ const layersData = [ name: 'Google Maps 3D Tiles', img: 'ui_assets/cards/google3d.jpg', icon: 'ui_assets/cards/icons/google24.png', - requiresPro: true, description: 'Adds an entity to load and display 3d tiles from Google Maps Tiles API 3D Tiles endpoint. This will break your scene and you cannot save it yet, so beware before testing.', id: 4, diff --git a/src/editor/components/components/GeoPanel/GeoPanel.component.jsx b/src/editor/components/components/GeoPanel/GeoPanel.component.jsx index ad9d01599..bbb44f952 100644 --- a/src/editor/components/components/GeoPanel/GeoPanel.component.jsx +++ b/src/editor/components/components/GeoPanel/GeoPanel.component.jsx @@ -15,10 +15,8 @@ const GeoPanel = () => { posthog.capture('geo_panel_clicked'); if (!currentUser) { Events.emit('opensigninmodal'); - } else if (currentUser.isPro) { - Events.emit('opengeomodal'); } else { - Events.emit('openpaymentmodal'); + Events.emit('opengeomodal'); } }; diff --git a/src/editor/components/scenegraph/Toolbar.js b/src/editor/components/scenegraph/Toolbar.js index e48865630..9542d2754 100644 --- a/src/editor/components/scenegraph/Toolbar.js +++ b/src/editor/components/scenegraph/Toolbar.js @@ -184,20 +184,6 @@ export default class Toolbar extends Component { return; } - // check if the user is not pro, and if the geospatial has array of values of mapbox - const streetGeo = document - .getElementById('reference-layers') - ?.getAttribute('street-geo'); - if ( - !this.props.currentUser.isPro && - streetGeo && - streetGeo['latitude'] && - streetGeo['longitude'] - ) { - Events.emit('openpaymentmodal'); - return; - } - // if owner != doc.id then doSaveAs = true; const isCurrentUserTheSceneAuthor = await isSceneAuthor({ sceneId: currentSceneId,