mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-23 20:07:40 +02:00
19 lines
531 B
JavaScript
19 lines
531 B
JavaScript
|
import { connect } from 'react-redux';
|
||
|
import Component from './access-component';
|
||
|
|
||
|
const mapStateToProps = (state, props) => {
|
||
|
const projectBase = { id: '', name: '', description: '' };
|
||
|
const realProject = state.projects.toJS().find(n => n.id === props.projectId);
|
||
|
const project = Object.assign(projectBase, realProject);
|
||
|
|
||
|
return {
|
||
|
project,
|
||
|
};
|
||
|
};
|
||
|
|
||
|
const mapDispatchToProps = () => ({});
|
||
|
|
||
|
const AccessContainer = connect(mapStateToProps, mapDispatchToProps)(Component);
|
||
|
|
||
|
export default AccessContainer;
|