Last active
May 21, 2018 17:47
-
-
Save peterfication/da0c5534a7697c3144d2a8fc7866c981 to your computer and use it in GitHub Desktop.
welcome_mail.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { generateFetchLocale } from 'lib/utils' | |
import * as React from 'react' | |
import Button from 'templates/html/snippets/Button' | |
import Closing from 'templates/html/snippets/Closing' | |
import Footer from 'templates/html/snippets/Footer' | |
import FullWidthBorder from 'templates/html/snippets/FullWidthBorder' | |
import Greeting from 'templates/html/snippets/Greeting' | |
import Header from 'templates/html/snippets/Header' | |
import Layout from 'templates/html/snippets/Layout' | |
import Text from 'templates/html/snippets/Text' | |
import Title from 'templates/html/snippets/Title' | |
import locales = require('templates/locales/Welcome.json') | |
const Welcome: React.SFC<WelcomeProps> = props => { | |
const link = props.link || 'https://www.store2be.com' | |
const user = props.user || { title: '', lastname: '' } | |
const { locale } = props | |
const fetchLocale = generateFetchLocale(locale, locales) | |
return ( | |
<Layout env={props.env}> | |
<Header /> | |
<Title>{fetchLocale('title')}</Title> | |
<Greeting locale={locale} lastname={user.lastname} title={user.title} /> | |
<Text>{fetchLocale('welcome_please_confirm')}</Text> | |
<Button link={link}>{fetchLocale('button')}</Button> | |
<Text> | |
{fetchLocale('button_not_working') + ' '} | |
<a href={link}>{link}</a> | |
</Text> | |
<Closing locale={locale} /> | |
<FullWidthBorder /> | |
<Footer locale={locale} /> | |
</Layout> | |
) | |
} | |
export default Welcome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment