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/components/auth/Welcome.js | |
download | ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.gz ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.zst ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.zip |
initial commit
Diffstat (limited to 'src/components/auth/Welcome.js')
-rw-r--r-- | src/components/auth/Welcome.js | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js new file mode 100644 index 000000000..06b10ecfe --- /dev/null +++ b/src/components/auth/Welcome.js | |||
@@ -0,0 +1,69 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | ||
4 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | |||
6 | import Link from '../ui/Link'; | ||
7 | |||
8 | const messages = defineMessages({ | ||
9 | signupButton: { | ||
10 | id: 'welcome.signupButton', | ||
11 | defaultMessage: '!!!Create a free account', | ||
12 | }, | ||
13 | loginButton: { | ||
14 | id: 'welcome.loginButton', | ||
15 | defaultMessage: '!!!Login to your account', | ||
16 | }, | ||
17 | }); | ||
18 | |||
19 | @observer | ||
20 | export default class Login extends Component { | ||
21 | static propTypes = { | ||
22 | loginRoute: PropTypes.string.isRequired, | ||
23 | signupRoute: PropTypes.string.isRequired, | ||
24 | recipes: MobxPropTypes.arrayOrObservableArray.isRequired, | ||
25 | }; | ||
26 | |||
27 | static contextTypes = { | ||
28 | intl: intlShape, | ||
29 | }; | ||
30 | |||
31 | render() { | ||
32 | const { intl } = this.context; | ||
33 | const { | ||
34 | loginRoute, | ||
35 | signupRoute, | ||
36 | recipes, | ||
37 | } = this.props; | ||
38 | |||
39 | return ( | ||
40 | <div className="welcome"> | ||
41 | <div className="welcome__content"> | ||
42 | <img src="./assets/images/logo.svg" className="welcome__logo" alt="" /> | ||
43 | {/* <img src="./assets/images/welcome.png" className="welcome__services" alt="" /> */} | ||
44 | <div className="welcome__text"> | ||
45 | <h1>Franz</h1> | ||
46 | </div> | ||
47 | </div> | ||
48 | <div className="welcome__buttons"> | ||
49 | <Link to={signupRoute} className="button"> | ||
50 | {intl.formatMessage(messages.signupButton)} | ||
51 | </Link> | ||
52 | <Link to={loginRoute} className="button"> | ||
53 | {intl.formatMessage(messages.loginButton)} | ||
54 | </Link> | ||
55 | </div> | ||
56 | <div className="welcome__featured-services"> | ||
57 | {recipes.map(recipe => ( | ||
58 | <img | ||
59 | key={recipe.id} | ||
60 | src={recipe.icons.svg} | ||
61 | className="welcome__featured-service" | ||
62 | alt="" | ||
63 | /> | ||
64 | ))} | ||
65 | </div> | ||
66 | </div> | ||
67 | ); | ||
68 | } | ||
69 | } | ||