2016-08-18 11:41:13 +02:00
|
|
|
/*
|
|
|
|
*
|
2017-08-21 15:12:53 +02:00
|
|
|
* HomePage
|
2016-08-18 11:47:26 +02:00
|
|
|
*
|
2016-08-18 11:41:13 +02:00
|
|
|
*/
|
|
|
|
|
2017-09-26 16:36:28 +02:00
|
|
|
import React from 'react';
|
2016-08-19 13:57:50 +02:00
|
|
|
import { connect } from 'react-redux';
|
2017-08-21 15:12:53 +02:00
|
|
|
import Helmet from 'react-helmet';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
2017-10-18 16:51:50 +02:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { map } from 'lodash';
|
|
|
|
|
|
|
|
import Button from 'components/Button';
|
|
|
|
|
|
|
|
import Logo from 'assets/images/background_welcome_homepage.png';
|
|
|
|
|
2017-08-21 15:12:53 +02:00
|
|
|
import messages from './messages.json';
|
|
|
|
import styles from './styles.scss';
|
2016-08-18 11:41:13 +02:00
|
|
|
|
2017-10-18 16:51:50 +02:00
|
|
|
/* eslint-disable jsx-a11y/anchor-has-content */
|
2016-08-19 13:57:50 +02:00
|
|
|
export class HomePage extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
2016-08-18 11:41:13 +02:00
|
|
|
render() {
|
2017-10-18 16:51:50 +02:00
|
|
|
const links = ['https://stackoverflow.com/questions/tagged/strapi', 'https://github.com/strapi/strapi/issues', 'https://slack.strapi.io/'];
|
2016-08-18 11:41:13 +02:00
|
|
|
return (
|
2017-08-21 15:12:53 +02:00
|
|
|
<div className={styles.wrapper}>
|
|
|
|
<Helmet
|
|
|
|
title="Home Page"
|
|
|
|
/>
|
2017-10-18 16:51:50 +02:00
|
|
|
<img src={Logo} alt="homepage_logo" />
|
|
|
|
<h1><FormattedMessage {...messages.welcome} /></h1>
|
|
|
|
<p><FormattedMessage id="app.components.HomePage.description.part1" /></p>
|
|
|
|
<p><FormattedMessage id="app.components.HomePage.description.part2" /></p>
|
|
|
|
<div className={styles.buttonContainer}>
|
|
|
|
<Button className={styles.button} label="app.components.HomePage.button" onClick={() => this.props.history.push('/plugins/content-type-builder')} />
|
|
|
|
</div>
|
|
|
|
<p><FormattedMessage id="app.components.HomePage.feedback" /></p>
|
|
|
|
<div className={styles.linkContainer}>
|
|
|
|
{map(links, (value) => <a key={value} href={value} target="_blank" />)}
|
|
|
|
</div>
|
2016-08-19 13:57:50 +02:00
|
|
|
</div>
|
2016-08-18 11:41:13 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2016-08-19 13:57:50 +02:00
|
|
|
|
2017-10-18 16:51:50 +02:00
|
|
|
HomePage.propTypes = {
|
|
|
|
history: PropTypes.object.isRequired,
|
|
|
|
};
|
2016-08-19 13:57:50 +02:00
|
|
|
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
|
|
return {
|
|
|
|
dispatch,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-08-21 15:12:53 +02:00
|
|
|
export default connect(mapDispatchToProps)(HomePage);
|