Merge pull request #833 from mlorb/ml-sci-1686

Add new team to redux [SCI-1686]
This commit is contained in:
mlorb 2017-10-18 13:10:10 +02:00 committed by GitHub
commit 18e434c945

View file

@ -1,4 +1,5 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { connect } from "react-redux";
import { import {
Breadcrumb, Breadcrumb,
FormGroup, FormGroup,
@ -25,6 +26,7 @@ import {
NAME_MAX_LENGTH, NAME_MAX_LENGTH,
TEXT_MAX_LENGTH TEXT_MAX_LENGTH
} from "../../../../../config/constants/numeric"; } from "../../../../../config/constants/numeric";
import { getTeamsList } from "../../../../../components/actions/TeamsActions";
import { BORDER_LIGHT_COLOR } from "../../../../../config/constants/colors"; import { BORDER_LIGHT_COLOR } from "../../../../../config/constants/colors";
@ -39,7 +41,9 @@ const Wrapper = styled.div`
padding: 16px 15px 50px 15px; padding: 16px 15px 50px 15px;
`; `;
const MyFormGroupDiv = styled.div`margin-bottom: 15px;`; const MyFormGroupDiv = styled.div`
margin-bottom: 15px;
`;
class SettingsNewTeam extends Component { class SettingsNewTeam extends Component {
constructor(props) { constructor(props) {
@ -76,6 +80,7 @@ class SettingsNewTeam extends Component {
}) })
.then(sr => { .then(sr => {
// Redirect to the new team page // Redirect to the new team page
this.props.getTeamsList();
this.newState = { ...this.state }; this.newState = { ...this.state };
this.newState = update(this.newState, { this.newState = update(this.newState, {
redirectTo: { redirectTo: {
@ -266,4 +271,4 @@ class SettingsNewTeam extends Component {
} }
} }
export default SettingsNewTeam; export default connect(null, { getTeamsList })(SettingsNewTeam);