Skip to content

Commit

Permalink
Merge pull request #716 from 3DStreet/hide-add-panel-payment
Browse files Browse the repository at this point in the history
hide add layer panel when opening up payment modal:
  • Loading branch information
kfarr authored Jul 19, 2024
2 parents 86c3fac + b2c7207 commit 5ff07ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/editor/components/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ export default class Main extends Component {
posthog.capture('payment_modal_opened');
this.setState({ isPaymentModalOpened: true });
});
Events.on('hideAddLayerPanel', () => {
this.setState({ isAddLayerPanelOpen: false });
});
}

onCloseHelpModal = (value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ const AddLayerPanel = ({ onClose, isAddLayerPanelOpen }) => {
isProUser: isProUser
});
if (card.requiresPro && !isProUser) {
Events.emit('hideAddLayerPanel');
Events.emit('openpaymentmodal');
} else if (card.mixinId) {
createEntity(card.mixinId);
Expand Down

0 comments on commit 5ff07ad

Please sign in to comment.