File tree 2 files changed +7
-6
lines changed
ui/cap-react/src/components
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ import PropTypes from "prop-types";
5
5
export default class OauthPopup extends React . PureComponent {
6
6
constructor ( props ) {
7
7
super ( props ) ;
8
+ const queryString = window . location . search ;
9
+ const urlParams = new URLSearchParams ( queryString ) ;
10
+
8
11
window [ "loginCallBack" ] = function ( ) {
9
- if ( props . loginCallBack ) props . loginCallBack ( ) ;
12
+ if ( props . loginCallBack ) props . loginCallBack ( urlParams . get ( 'next' ) ) ;
10
13
return null ;
11
14
} ;
12
15
}
@@ -34,3 +37,4 @@ OauthPopup.propTypes = {
34
37
url : PropTypes . string ,
35
38
loginCallBack : PropTypes . func
36
39
} ;
40
+
Original file line number Diff line number Diff line change @@ -37,13 +37,10 @@ class WelcomePage extends React.Component {
37
37
} ;
38
38
}
39
39
40
- loginCallBack = ( ) => {
41
- // const path = this.props.location.pathname;
42
- let {
43
- location : { state : { next : next = undefined } = { } }
44
- } = this . props . history ;
40
+ loginCallBack = ( next ) => {
45
41
this . props . initCurrentUser ( next ) ;
46
42
} ;
43
+
47
44
onFormSubmit = formData => {
48
45
// fetch the next from history
49
46
formData [ "next" ] = this . state . next ;
You can’t perform that action at this time.
0 commit comments