import React, {Component} from 'react'; import PromptButton from '../base/PromptButton'; import Link from '../base/Link'; import Modal from '../base/Modal'; import ModalBody from '../base/ModalBody'; import ModalHeader from '../base/ModalHeader'; import {trackEvent} from '../../../analytics'; import * as session from '../../../sync/session'; import * as sync from '../../../sync/index'; let hidePaymentNotificationUntilNextLaunch = false; class PaymentNotificationModal extends Component { _handleCancel = async () => { await sync.cancelTrial(); this.hide(); }; 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 ( this.modal = m}> Upgrade Now to Insomnia Plus

Hi {session.getFirstName()},

Your Insomnia Plus trial has come to an end. Subscribe to a plan to continue using Plus features like encrypted data synchronization and backup.


End Subscription {" "} Subscribe Now

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