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

47 lines
914 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,
2017-01-23 17:47:45 +02:00
orgUISelector,
membersSelector
} = 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),
2017-01-23 17:47:45 +02:00
orgUI: orgUISelector(state),
platformMembers: membersSelector(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);