diff --git a/portal-ui/package.json b/portal-ui/package.json index 651b6d876..d2759abfe 100644 --- a/portal-ui/package.json +++ b/portal-ui/package.json @@ -30,7 +30,7 @@ "kbar": "^0.1.0-beta.34", "local-storage-fallback": "^4.1.1", "lodash": "^4.17.21", - "mds": "https://github.com/minio/mds.git#v0.0.5", + "mds": "https://github.com/minio/mds.git#v0.0.7", "minio": "^7.0.28", "moment": "^2.29.4", "react": "^18.1.0", diff --git a/portal-ui/src/MainRouter.tsx b/portal-ui/src/MainRouter.tsx index 34f84c6f6..40ffb40a7 100644 --- a/portal-ui/src/MainRouter.tsx +++ b/portal-ui/src/MainRouter.tsx @@ -39,7 +39,14 @@ const MainRouter = () => { } /> - } /> + }> + + + } + /> { // if we're still trying to retrieve user session render nothing if (sessionLoading) { - return null; + return ; } // redirect user to the right page based on session status return userLoggedIn ? : ; diff --git a/portal-ui/src/common/LoadingComponent.tsx b/portal-ui/src/common/LoadingComponent.tsx index d4bd13cee..0cb582e02 100644 --- a/portal-ui/src/common/LoadingComponent.tsx +++ b/portal-ui/src/common/LoadingComponent.tsx @@ -30,8 +30,6 @@ const LoadingComponent = () => { > -
- Loading...
); diff --git a/portal-ui/src/screens/LogoutPage/LogoutPage.tsx b/portal-ui/src/screens/LogoutPage/LogoutPage.tsx index ca4d768d1..3c4d45cb9 100644 --- a/portal-ui/src/screens/LogoutPage/LogoutPage.tsx +++ b/portal-ui/src/screens/LogoutPage/LogoutPage.tsx @@ -19,9 +19,10 @@ import { useNavigate } from "react-router-dom"; import { useAppDispatch } from "../../store"; import { ErrorResponseHandler } from "../../common/types"; import { clearSession } from "../../common/utils"; -import api from "../../common/api"; import { userLogged } from "../../systemSlice"; import { resetSession } from "../Console/consoleSlice"; +import api from "../../common/api"; +import LoadingComponent from "../../common/LoadingComponent"; const LogoutPage = () => { const dispatch = useAppDispatch(); @@ -33,7 +34,7 @@ const LogoutPage = () => { localStorage.setItem("userLoggedIn", ""); localStorage.setItem("redirect-path", ""); dispatch(resetSession()); - navigate(`login`); + navigate(`/login`); }; const state = localStorage.getItem("auth-state"); api @@ -47,7 +48,7 @@ const LogoutPage = () => { }); }; logout(); - return <>; + return ; }; export default LogoutPage; diff --git a/portal-ui/yarn.lock b/portal-ui/yarn.lock index 931c15a12..1092adce2 100644 --- a/portal-ui/yarn.lock +++ b/portal-ui/yarn.lock @@ -7969,9 +7969,9 @@ mdn-data@2.0.4: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== -"mds@https://github.com/minio/mds.git#v0.0.5": - version "0.0.5" - resolved "https://github.com/minio/mds.git#b9183841f178b7cc3ef320554f762c1d5bf6d7bd" +"mds@https://github.com/minio/mds.git#v0.0.7": + version "0.0.7" + resolved "https://github.com/minio/mds.git#dd51b9d694550e7737e6cf2462195b8ad70fbfe6" dependencies: "@types/styled-components" "^5.1.25" styled-components "^5.3.6"