aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/WelcomeScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/auth/WelcomeScreen.js')
-rw-r--r--src/containers/auth/WelcomeScreen.js34
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 @@
1import React, { Component } from 'react';
2import PropTypes from 'prop-types';
3import { inject, observer } from 'mobx-react';
4
5import Welcome from '../../components/auth/Welcome';
6import UserStore from '../../stores/UserStore';
7import RecipePreviewsStore from '../../stores/RecipePreviewsStore';
8import { gaPage } from '../../lib/analytics';
9
10@inject('stores', 'actions') @observer
11export 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
29LoginScreen.wrappedComponent.propTypes = {
30 stores: PropTypes.shape({
31 user: PropTypes.instanceOf(UserStore).isRequired,
32 recipePreviews: PropTypes.instanceOf(RecipePreviewsStore).isRequired,
33 }).isRequired,
34};