Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove pro deps for geo #782

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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