mirror of
https://github.com/yldio/copilot.git
synced 2024-09-21 13:53:51 +03:00
fix projects unconected test
This commit is contained in:
parent
3d50f4201d
commit
b29433c2e0
@ -14,7 +14,6 @@ const buttonStyle = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const People = (props) => {
|
const People = (props) => {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
UI = {},
|
UI = {},
|
||||||
handleToggle,
|
handleToggle,
|
||||||
|
@ -25,14 +25,11 @@ const {
|
|||||||
projectRemoveMember,
|
projectRemoveMember,
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
const People = (props) => {
|
const People = (props) => (
|
||||||
|
<Section {...props}>
|
||||||
return (
|
<PeopleSection {...props} />
|
||||||
<Section {...props}>
|
</Section>
|
||||||
<PeopleSection {...props} />
|
);
|
||||||
</Section>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapStateToProps = (state, {
|
const mapStateToProps = (state, {
|
||||||
params = {}
|
params = {}
|
||||||
|
@ -26,8 +26,7 @@ const {
|
|||||||
const Projects = (props) => {
|
const Projects = (props) => {
|
||||||
const {
|
const {
|
||||||
org = {},
|
org = {},
|
||||||
projects = [],
|
projects = []
|
||||||
router
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const empty = projects.length ? null : (
|
const empty = projects.length ? null : (
|
||||||
@ -45,15 +44,12 @@ const Projects = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
const onCreateProject = (evt) =>
|
|
||||||
router.transitionTo(`/${org.id}/new-project`);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{empty}
|
{empty}
|
||||||
<Row>
|
<Row>
|
||||||
<Column xs={12}>
|
<Column xs={12}>
|
||||||
<Button onClick={onCreateProject}>
|
<Button href={`/${org.id}/new-project`}>
|
||||||
<FormattedMessage id='create-new' />
|
<FormattedMessage id='create-new' />
|
||||||
</Button>
|
</Button>
|
||||||
</Column>
|
</Column>
|
||||||
@ -69,8 +65,7 @@ const Projects = (props) => {
|
|||||||
|
|
||||||
Projects.propTypes = {
|
Projects.propTypes = {
|
||||||
org: PropTypes.org,
|
org: PropTypes.org,
|
||||||
projects: React.PropTypes.arrayOf(PropTypes.project),
|
projects: React.PropTypes.arrayOf(PropTypes.project)
|
||||||
router: React.PropTypes.object
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state, {
|
const mapStateToProps = (state, {
|
||||||
@ -79,8 +74,7 @@ const mapStateToProps = (state, {
|
|||||||
}
|
}
|
||||||
}) => ({
|
}) => ({
|
||||||
org: orgByIdSelector(match.params.org)(state),
|
org: orgByIdSelector(match.params.org)(state),
|
||||||
projects: projectsByOrgIdSelector(match.params.org)(state),
|
projects: projectsByOrgIdSelector(match.params.org)(state)
|
||||||
router: state.app.router
|
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = connect(
|
module.exports = connect(
|
||||||
|
Loading…
Reference in New Issue
Block a user