File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import {useOutletContext} from "react-router-dom";
4
4
import { LOGIN_PATH } from "../../constants/app" ;
5
5
import Intro from "../Intro" ;
6
6
import { Container , Spinner } from "reactstrap" ;
7
- import { setPostAuthPath } from "../../helpers/localStorage" ;
8
7
9
8
const LoadingContainer = React . memo ( ( ) => (
10
9
< Container >
@@ -21,8 +20,7 @@ const ProtectedPageContainer = React.memo(({children}) => {
21
20
const onTerms = useCallback ( ( ) => setTermsModal ( true ) , [ ] ) ;
22
21
const onAccess = useCallback ( ( ) => {
23
22
if ( ! userData ) {
24
- // Set our post-auth redirect and redirect to sign in, so we can capture some information about their identity.
25
- setPostAuthPath ( window . location . pathname ) ;
23
+ // Redirect to sign in, so we can capture some information about their identity.
26
24
window . location . href = `${ LOGIN_PATH } ?redirect=${ window . location . pathname } ` ;
27
25
} else {
28
26
// Signed in but terms not accepted yet; show the modal.
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import {
23
23
fetchMessages ,
24
24
fetchUser
25
25
} from './actions.js'
26
- import { popPostAuthPath } from "./helpers/localStorage" ;
27
26
28
27
29
28
const initialState = { } ;
@@ -51,13 +50,7 @@ render(
51
50
document . querySelector ( '#root' )
52
51
) ;
53
52
54
- store . dispatch ( fetchUser ( ) ) . then ( ( ) => {
55
- const postAuthPath = popPostAuthPath ( ) ;
56
- if ( postAuthPath ) {
57
- window . location . replace ( postAuthPath ) ;
58
- }
59
- } ) ;
60
-
53
+ store . dispatch ( fetchUser ( ) ) ;
61
54
store . dispatch ( fetchMessages ( ) ) ; // Server-side messages, e.g. auth errors
62
55
63
56
store . dispatch ( fetchAssays ( ) ) ;
You can’t perform that action at this time.
0 commit comments