diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-10-13 12:29:40 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2017-10-13 12:29:40 +0200 |
commit | 58cda9cc7fb79ca9df6746de7f9662bc08dc156a (patch) | |
tree | 1211600c2a5d3b5f81c435c6896618111a611720 /src/containers/auth/WelcomeScreen.js | |
download | ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.gz ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.zst ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.zip |
initial commit
Diffstat (limited to 'src/containers/auth/WelcomeScreen.js')
-rw-r--r-- | src/containers/auth/WelcomeScreen.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/containers/auth/WelcomeScreen.js b/src/containers/auth/WelcomeScreen.js new file mode 100644 index 000000000..e413264a6 --- /dev/null +++ b/src/containers/auth/WelcomeScreen.js | |||
@@ -0,0 +1,34 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | |||
5 | import Welcome from '../../components/auth/Welcome'; | ||
6 | import UserStore from '../../stores/UserStore'; | ||
7 | import RecipePreviewsStore from '../../stores/RecipePreviewsStore'; | ||
8 | import { gaPage } from '../../lib/analytics'; | ||
9 | |||
10 | @inject('stores', 'actions') @observer | ||
11 | export default class LoginScreen extends Component { | ||
12 | componentDidMount() { | ||
13 | gaPage('Auth/Welcome'); | ||
14 | } | ||
15 | |||
16 | render() { | ||
17 | const { user, recipePreviews } = this.props.stores; | ||
18 | |||
19 | return ( | ||
20 | <Welcome | ||
21 | loginRoute={user.loginRoute} | ||
22 | signupRoute={user.signupRoute} | ||
23 | recipes={recipePreviews.featured} | ||
24 | /> | ||
25 | ); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | LoginScreen.wrappedComponent.propTypes = { | ||
30 | stores: PropTypes.shape({ | ||
31 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
32 | recipePreviews: PropTypes.instanceOf(RecipePreviewsStore).isRequired, | ||
33 | }).isRequired, | ||
34 | }; | ||