File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
ui/cap-react/src/components Expand file tree Collapse file tree 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";
55export default class OauthPopup extends React . PureComponent {
66 constructor ( props ) {
77 super ( props ) ;
8+ const queryString = window . location . search ;
9+ const urlParams = new URLSearchParams ( queryString ) ;
10+
811 window [ "loginCallBack" ] = function ( ) {
9- if ( props . loginCallBack ) props . loginCallBack ( ) ;
12+ if ( props . loginCallBack ) props . loginCallBack ( urlParams . get ( 'next' ) ) ;
1013 return null ;
1114 } ;
1215 }
@@ -34,3 +37,4 @@ OauthPopup.propTypes = {
3437 url : PropTypes . string ,
3538 loginCallBack : PropTypes . func
3639} ;
40+
Original file line number Diff line number Diff line change @@ -37,13 +37,10 @@ class WelcomePage extends React.Component {
3737 } ;
3838 }
3939
40- loginCallBack = ( ) => {
41- // const path = this.props.location.pathname;
42- let {
43- location : { state : { next : next = undefined } = { } }
44- } = this . props . history ;
40+ loginCallBack = ( next ) => {
4541 this . props . initCurrentUser ( next ) ;
4642 } ;
43+
4744 onFormSubmit = formData => {
4845 // fetch the next from history
4946 formData [ "next" ] = this . state . next ;
You can’t perform that action at this time.
0 commit comments