Skip to content

Commit

Permalink
remove pro deps for geo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Gupta authored and Rahul Gupta committed Aug 16, 2024
1 parent 51f0ee2 commit c6e4cd8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/editor/components/components/AddLayerPanel/layersData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
};

Expand Down
14 changes: 0 additions & 14 deletions src/editor/components/scenegraph/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c6e4cd8

Please sign in to comment.