aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/ui/SubscriptionPopupScreen.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-10-13 12:29:40 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-10-13 12:29:40 +0200
commit58cda9cc7fb79ca9df6746de7f9662bc08dc156a (patch)
tree1211600c2a5d3b5f81c435c6896618111a611720 /src/containers/ui/SubscriptionPopupScreen.js
downloadferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.gz
ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.zst
ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.zip
initial commit
Diffstat (limited to 'src/containers/ui/SubscriptionPopupScreen.js')
-rw-r--r--src/containers/ui/SubscriptionPopupScreen.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/containers/ui/SubscriptionPopupScreen.js b/src/containers/ui/SubscriptionPopupScreen.js
new file mode 100644
index 000000000..d17477b1d
--- /dev/null
+++ b/src/containers/ui/SubscriptionPopupScreen.js
@@ -0,0 +1,43 @@
1import React, { Component } from 'react';
2import PropTypes from 'prop-types';
3import { inject, observer } from 'mobx-react';
4
5import SubscriptionPopup from '../../components/ui/SubscriptionPopup';
6
7
8@inject('stores', 'actions') @observer
9export default class SubscriptionPopupScreen extends Component {
10 state = {
11 complete: false,
12 };
13
14 completeCheck(event) {
15 const { url } = event;
16
17 if (url.includes('recurly') && url.includes('confirmation')) {
18 this.setState({
19 complete: true,
20 });
21 }
22 }
23
24 render() {
25 return (
26 <SubscriptionPopup
27 url={decodeURIComponent(this.props.router.params.url)}
28 closeWindow={() => window.close()}
29 completeCheck={e => this.completeCheck(e)}
30 isCompleted={this.state.complete}
31 />
32 );
33 }
34}
35
36
37SubscriptionPopupScreen.wrappedComponent.propTypes = {
38 router: PropTypes.shape({
39 params: PropTypes.shape({
40 url: PropTypes.string.isRequired,
41 }).isRequired,
42 }).isRequired,
43};