mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
Merge pull request #833 from mlorb/ml-sci-1686
Add new team to redux [SCI-1686]
This commit is contained in:
commit
18e434c945
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue