Skip to content

Commit

Permalink
hide add layer panel when opening up payment modal:
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulkgupta committed Jul 18, 2024
1 parent 487606d commit b2c7207
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 b2c7207

Please sign in to comment.