From 7e2886219f0b89d51350d55215dd0c24434d1065 Mon Sep 17 00:00:00 2001 From: Thomas Berrod Date: Fri, 21 Jun 2019 16:09:34 +0200 Subject: [PATCH] Mes candidatures setup --- nextjs/pages/Candidatures.js | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 nextjs/pages/Candidatures.js diff --git a/nextjs/pages/Candidatures.js b/nextjs/pages/Candidatures.js new file mode 100644 index 000000000..be7c1cb51 --- /dev/null +++ b/nextjs/pages/Candidatures.js @@ -0,0 +1,71 @@ + +import React from 'react'; +import { connect } from "react-redux"; +import PropTypes from 'prop-types'; + +import _ from "lodash" +import { withStyles } from '@material-ui/core/styles'; +import { Typography } from '@material-ui/core'; + +import LayoutGrid from "../components/templates/LayoutGrid"; +import Grid from "../components/templates/Grid" +import OffreRow from "../components/organisms/OffreRow" + +import { fetchAdsRequest } from '../actions/ads' +import { AdsSelector } from '../reducers/ads' + +const styles = theme => ({ + root: { + position: 'relative', + textAlign: 'center', + paddingTop: theme.spacing(20), + justifyContent: 'center', + }, + container: { + display: 'flex', + flexDirection: 'column', + height: '100%', + }, + +}); + +class Candidatures extends React.Component { + + render() { + const { classes } = this.props; + + return ( + + {/* TODO */} + + Mes candidatures //TODO + +
+ + +
+
+ ); + } +} + +Candidatures.propTypes = { + classes: PropTypes.object.isRequired, +}; + +function mapStateToProps(state) { + + return { + ads: Object.keys(state.ads).length !== 0 && AdsSelector(state), + //ads: state.ads.data, + currentPage: _.toNumber(!!state.ads.meta && _.ceil((state.ads.meta.offset + 1) / state.ads.meta.limit)), + recordCount: _.toNumber(!!state.ads.meta && state.ads.meta.total_items) + }; +} + +export default withStyles(styles)(connect(mapStateToProps, { fetchAdsRequest })(Candidatures))