Updated mds & fixed blank pages on login (#2494)
- Updates mds to v0.0.7 - Fixed an issue with blank pages during login - Fixes an issue during logout where path was redirected to 'logout/login' Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -39,7 +39,14 @@ const MainRouter = () => {
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route path="/logout" element={<Logout />} />
|
||||
<Route
|
||||
path="/logout"
|
||||
element={
|
||||
<Suspense fallback={<LoadingComponent />}>
|
||||
<Logout />
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/login"
|
||||
element={
|
||||
|
||||
@@ -35,6 +35,7 @@ import { SRInfoStateType } from "./types";
|
||||
import { AppState, useAppDispatch } from "./store";
|
||||
import { saveSessionResponse } from "./screens/Console/consoleSlice";
|
||||
import { getOverrideColorVariants } from "./utils/stylesUtils";
|
||||
import LoadingComponent from "./common/LoadingComponent";
|
||||
|
||||
interface ProtectedRouteProps {
|
||||
Component: any;
|
||||
@@ -119,7 +120,7 @@ const ProtectedRoute = ({ Component }: ProtectedRouteProps) => {
|
||||
|
||||
// if we're still trying to retrieve user session render nothing
|
||||
if (sessionLoading) {
|
||||
return null;
|
||||
return <LoadingComponent />;
|
||||
}
|
||||
// redirect user to the right page based on session status
|
||||
return userLoggedIn ? <Component /> : <StorePathAndRedirect />;
|
||||
|
||||
@@ -30,8 +30,6 @@ const LoadingComponent = () => {
|
||||
>
|
||||
<Grid item xs={3} style={{ textAlign: "center" }}>
|
||||
<Loader style={{ width: 35, height: 35 }} />
|
||||
<br />
|
||||
Loading...
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
@@ -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 <LoadingComponent />;
|
||||
};
|
||||
|
||||
export default LogoutPage;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user