import React, {PureComponent} from 'react'; import autobind from 'autobind-decorator'; import PromptButton from '../base/prompt-button'; import Link from '../base/link'; import Modal from '../base/modal'; import ModalBody from '../base/modal-body'; import ModalHeader from '../base/modal-header'; import {trackEvent} from '../../../analytics'; import * as session from '../../../sync/session'; import * as sync from '../../../sync/index'; let hidePaymentNotificationUntilNextLaunch = false; @autobind class PaymentNotificationModal extends PureComponent { async _handleCancel () { await sync.cancelTrial(); this.hide(); } _setModalRef (n) { this.modal = n; } show () { // Don't trigger automatically if user has dismissed it already if (hidePaymentNotificationUntilNextLaunch) { return; } hidePaymentNotificationUntilNextLaunch = true; this.modal.show(); } hide () { trackEvent('Billing', 'Trial Ended', 'Cancel'); this.modal.hide(); } render () { return ( Insomnia Plus Trial Ended

Hi {session.getFirstName()},

Your Insomnia Plus trial has come to an end. Please enter your billing info to continue using Plus features like encrypted data synchronization and backup.


Cancel Subscription    Update Billing

); } } PaymentNotificationModal.propTypes = {}; export default PaymentNotificationModal;