1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-04 09:00:05 +02:00
copilot/frontend/src/containers/org/people.js

45 lines
852 B
JavaScript
Raw Normal View History

2016-12-15 16:10:36 +02:00
const React = require('react');
const ReactRedux = require('react-redux');
const PeopleSection = require('@components/people-list');
const selectors = require('@state/selectors');
2016-12-20 21:06:02 +02:00
const Section = require('./section');
const actions = require('@state/actions');
2016-12-15 16:10:36 +02:00
const {
connect
} = ReactRedux;
const {
peopleByOrgIdSelector,
orgUISelector
} = selectors;
const {
handleInviteToggle
} = actions;
2016-12-15 16:10:36 +02:00
2016-12-20 21:06:02 +02:00
const People = (props) => {
2016-12-20 21:06:02 +02:00
return (
<Section {...props}>
<PeopleSection {...props} />
2016-12-20 21:06:02 +02:00
</Section>
);
2016-12-15 16:10:36 +02:00
};
const mapStateToProps = (state, {
params = {}
}) => ({
people: peopleByOrgIdSelector(params.org)(state),
orgUI: orgUISelector(state)
});
2016-12-15 16:10:36 +02:00
const mapDispatchToProps = (dispatch) => ({
handleToggle: () => dispatch(handleInviteToggle())
});
2016-12-15 16:10:36 +02:00
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(People);