70 lines
1.6 KiB
JavaScript
Raw Normal View History

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
*/
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';
2018-04-03 17:56:19 +02:00
// import { FormattedMessage } from 'react-intl';
// import PropTypes from 'prop-types';
import cn from 'classnames';
2017-10-18 16:51:50 +02:00
2018-04-03 17:56:19 +02:00
import Block from 'components/HomePageBlock/Loadable';
2018-04-04 10:21:06 +02:00
import Button from 'components/Button';
2018-04-04 08:54:15 +02:00
import Sub from 'components/Sub/Loadable';
2017-10-18 16:51:50 +02:00
2018-04-04 10:21:06 +02:00
import WelcomeContent from './WelcomeContent';
import CreateContent from './CreateContent';
2017-08-21 15:12:53 +02:00
import styles from './styles.scss';
2016-08-18 11:41:13 +02:00
2018-04-04 10:21:06 +02:00
const FIRST_BLOCK = [
{
title: {
id: 'app.components.HomePage.welcome',
},
content: () => <WelcomeContent />,
},
{
title: {
id: 'app.components.HomePage.create',
},
content: () => <CreateContent />,
},
];
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() {
return (
2018-04-03 17:56:19 +02:00
<div className={cn('container-fluid', styles.containerFluid)}>
<Helmet title="Home Page" />
<div className="row">
<div className="col-md-9 col-lg-9">
<Block>
2018-04-04 10:21:06 +02:00
{FIRST_BLOCK.map((value, key) => <Sub key={key} {...value} underline={key === 0} />)}
<Button className={styles.homePageTutorialButton} primary>START THE QUICK TUTORIAL</Button>
2018-04-03 17:56:19 +02:00
</Block>
</div>
<div className="col-lg-3 col-md-3">
<Block>tata</Block>
</div>
2017-10-18 16:51:50 +02:00
</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 = {
2018-04-03 17:56:19 +02:00
// history: PropTypes.object.isRequired,
2017-10-18 16:51:50 +02:00
};
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);