This repository was archived by the owner on Apr 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ function Login(): ReactElement {
51
51
if ( tokens . refreshToken && tokens . accessToken ?. token ) {
52
52
if ( dest ) {
53
53
history . push ( decodeURIComponent ( dest ) ) ;
54
+ window . location . reload ( ) ; // reload because we are leaving the spa
54
55
} else {
55
56
history . push ( "/" ) ;
56
57
}
Original file line number Diff line number Diff line change @@ -12,22 +12,20 @@ export default function Error400({ needsLogin }: Props) {
12
12
const dest = urlSearchParams . get ( "dest" ) ;
13
13
const message = urlSearchParams . get ( "message" ) ;
14
14
15
- const tryAgainUrl = needsLogin
16
- ? "/login?dest=" + dest
17
- : decodeURIComponent ( dest ?? "" ) ;
18
- console . log ( location ) ;
15
+ const tryAgainUrl = needsLogin ? (
16
+ < Link to = { "/login?dest=" + dest } > Try again</ Link >
17
+ ) : (
18
+ < a href = { decodeURIComponent ( dest ?? "" ) } > Try again </ a > // a tag because we are leaving the spa
19
+ ) ;
19
20
20
21
return (
21
22
< Container className = { "text-center" } >
22
23
< h2 > Something went wrong!</ h2 >
23
24
< h3 > The file could not be loaded</ h3 >
24
25
{ message && < h4 > { message } </ h4 > }
25
- { tryAgainUrl && (
26
- < p >
27
- < Link to = { tryAgainUrl } > Try again</ Link >
28
- </ p >
29
- ) }
26
+ { tryAgainUrl && < p > </ p > }
30
27
< Link to = "/" > Go to Home</ Link >
28
+ { tryAgainUrl }
31
29
</ Container >
32
30
) ;
33
31
}
You can’t perform that action at this time.
0 commit comments