import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; // import { Link } from 'react-router'; // import Button from '../ui/Button'; import Loader from '../ui/Loader'; import Appear from '../ui/effects/Appear'; import SubscriptionForm from '../../containers/subscription/SubscriptionFormScreen'; const messages = defineMessages({ headline: { id: 'pricing.headline', defaultMessage: '!!!Support Ferdi', }, monthlySupportLabel: { id: 'pricing.support.label', defaultMessage: '!!!Select your support plan', }, submitButtonLabel: { id: 'pricing.submit.label', defaultMessage: '!!!Support the development of Ferdi', }, skipPayment: { id: 'pricing.link.skipPayment', defaultMessage: '!!!I don\'t want to support the development of Ferdi.', }, }); export default @observer class Signup extends Component { static propTypes = { donor: MobxPropTypes.objectOrObservableObject.isRequired, isLoading: PropTypes.bool.isRequired, isLoadingUser: PropTypes.bool.isRequired, onCloseSubscriptionWindow: PropTypes.func.isRequired, skipAction: PropTypes.func.isRequired, }; static contextTypes = { intl: intlShape, }; render() { const { donor, isLoading, isLoadingUser, onCloseSubscriptionWindow, skipAction, } = this.props; const { intl } = this.context; return (

{intl.formatMessage(messages.headline)}

{isLoadingUser && (

Loading

)} {!isLoadingUser && ( donor.amount ? (

Thank you so much for your previous donation of {' '} $ {donor.amount} .
Your support allowed us to get where we are today.

As an early supporter, you get {' '} a lifetime premium supporter license {' '} without any additional charges.

However, If you want to keep supporting us, you are more than welcome to subscribe to a plan.

) : (

We built Ferdi with a lot of effort, manpower and love, to bring you the best messaging experience.

Getting a Ferdi Premium Supporter License will allow us to keep improving Ferdi for you.

) )}

Thanks for being a hero.

Stefan Malzner

{intl.formatMessage(messages.monthlySupportLabel)}
); } }