File tree Expand file tree Collapse file tree 6 files changed +18
-11
lines changed Expand file tree Collapse file tree 6 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 30
30
"kbar" : " ^0.1.0-beta.34" ,
31
31
"local-storage-fallback" : " ^4.1.1" ,
32
32
"lodash" : " ^4.17.21" ,
33
- "mds" : " https://github.com/minio/mds.git#v0.0.5 " ,
33
+ "mds" : " https://github.com/minio/mds.git#v0.0.7 " ,
34
34
"minio" : " ^7.0.28" ,
35
35
"moment" : " ^2.29.4" ,
36
36
"react" : " ^18.1.0" ,
Original file line number Diff line number Diff line change @@ -39,7 +39,14 @@ const MainRouter = () => {
39
39
</ Suspense >
40
40
}
41
41
/>
42
- < Route path = "/logout" element = { < Logout /> } />
42
+ < Route
43
+ path = "/logout"
44
+ element = {
45
+ < Suspense fallback = { < LoadingComponent /> } >
46
+ < Logout />
47
+ </ Suspense >
48
+ }
49
+ />
43
50
< Route
44
51
path = "/login"
45
52
element = {
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import { SRInfoStateType } from "./types";
35
35
import { AppState , useAppDispatch } from "./store" ;
36
36
import { saveSessionResponse } from "./screens/Console/consoleSlice" ;
37
37
import { getOverrideColorVariants } from "./utils/stylesUtils" ;
38
+ import LoadingComponent from "./common/LoadingComponent" ;
38
39
39
40
interface ProtectedRouteProps {
40
41
Component : any ;
@@ -119,7 +120,7 @@ const ProtectedRoute = ({ Component }: ProtectedRouteProps) => {
119
120
120
121
// if we're still trying to retrieve user session render nothing
121
122
if ( sessionLoading ) {
122
- return null ;
123
+ return < LoadingComponent /> ;
123
124
}
124
125
// redirect user to the right page based on session status
125
126
return userLoggedIn ? < Component /> : < StorePathAndRedirect /> ;
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ const LoadingComponent = () => {
30
30
>
31
31
< Grid item xs = { 3 } style = { { textAlign : "center" } } >
32
32
< Loader style = { { width : 35 , height : 35 } } />
33
- < br />
34
- Loading...
35
33
</ Grid >
36
34
</ Grid >
37
35
) ;
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ import { useNavigate } from "react-router-dom";
19
19
import { useAppDispatch } from "../../store" ;
20
20
import { ErrorResponseHandler } from "../../common/types" ;
21
21
import { clearSession } from "../../common/utils" ;
22
- import api from "../../common/api" ;
23
22
import { userLogged } from "../../systemSlice" ;
24
23
import { resetSession } from "../Console/consoleSlice" ;
24
+ import api from "../../common/api" ;
25
+ import LoadingComponent from "../../common/LoadingComponent" ;
25
26
26
27
const LogoutPage = ( ) => {
27
28
const dispatch = useAppDispatch ( ) ;
@@ -33,7 +34,7 @@ const LogoutPage = () => {
33
34
localStorage . setItem ( "userLoggedIn" , "" ) ;
34
35
localStorage . setItem ( "redirect-path" , "" ) ;
35
36
dispatch ( resetSession ( ) ) ;
36
- navigate ( `login` ) ;
37
+ navigate ( `/ login` ) ;
37
38
} ;
38
39
const state = localStorage . getItem ( "auth-state" ) ;
39
40
api
@@ -47,7 +48,7 @@ const LogoutPage = () => {
47
48
} ) ;
48
49
} ;
49
50
logout ( ) ;
50
- return < > < /> ;
51
+ return < LoadingComponent /> ;
51
52
} ;
52
53
53
54
export default LogoutPage ;
Original file line number Diff line number Diff line change @@ -7969,9 +7969,9 @@ mdn-data@2.0.4:
7969
7969
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b"
7970
7970
integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==
7971
7971
7972
- "mds@https://github.com/minio/mds.git#v0.0.5 ":
7973
- version "0.0.5 "
7974
- resolved "https://github.com/minio/mds.git#b9183841f178b7cc3ef320554f762c1d5bf6d7bd "
7972
+ "mds@https://github.com/minio/mds.git#v0.0.7 ":
7973
+ version "0.0.7 "
7974
+ resolved "https://github.com/minio/mds.git#dd51b9d694550e7737e6cf2462195b8ad70fbfe6 "
7975
7975
dependencies:
7976
7976
"@types/styled-components" "^5.1.25"
7977
7977
styled-components "^5.3.6"
You can’t perform that action at this time.
0 commit comments