Merge branch 'decoupling-settings-page' of https://github.com/biosistemika/scinote-web into zd_SCI_1688

This commit is contained in:
zmagod 2017-10-18 14:15:28 +02:00
commit d2c3827289
2 changed files with 5 additions and 2 deletions

View file

@ -153,7 +153,7 @@ module Users
def update_sanitized_params
# Solution for Devise < 4.0.0
devise_parameter_sanitizer.for(:accept_invitation) << :full_name
devise_parameter_sanitizer.permit(:sign_up, keys: [:full_name])
end
def check_captcha

View file

@ -1,5 +1,6 @@
// @flow
import React, { Component } from "react";
import { connect } from "react-redux";
import {
Breadcrumb,
FormGroup,
@ -27,6 +28,7 @@ import {
NAME_MAX_LENGTH,
TEXT_MAX_LENGTH
} from "../../../../../config/constants/numeric";
import { getTeamsList } from "../../../../../components/actions/TeamsActions";
import { BORDER_LIGHT_COLOR } from "../../../../../config/constants/colors";
@ -95,6 +97,7 @@ class SettingsNewTeam extends Component<Props, State> {
createNewTeam(this.state.team)
.then(response => {
// Redirect to the new team page
this.props.getTeamsList();
(this: any).newState = { ...this.state };
(this: any).newState = update((this: any).newState, {
redirectTo: {
@ -287,4 +290,4 @@ class SettingsNewTeam extends Component<Props, State> {
}
}
export default SettingsNewTeam;
export default connect(null, { getTeamsList })(SettingsNewTeam);