Make Login assets and redirects relative (#1854)
This commit is contained in:
@@ -72,7 +72,7 @@ const ProtectedRoute = ({
|
||||
return null;
|
||||
}
|
||||
// redirect user to the right page based on session status
|
||||
return loggedIn ? <Component /> : <Redirect to={{ pathname: "/login" }} />;
|
||||
return loggedIn ? <Component /> : <Redirect to={{ pathname: "login" }} />;
|
||||
};
|
||||
|
||||
const mapState = (state: AppState) => ({
|
||||
|
||||
@@ -46,7 +46,7 @@ const Routes = () => {
|
||||
children={(routerProps) => (
|
||||
<div
|
||||
style={{
|
||||
backgroundImage: `url('/images/background-wave-orig2.svg'), url('/images/background.svg')`,
|
||||
backgroundImage: `url('images/background-wave-orig2.svg'), url('images/background.svg')`,
|
||||
backgroundPosition: "center 250px, center center",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "2547px 980px,cover",
|
||||
|
||||
@@ -37,7 +37,7 @@ export class API {
|
||||
clearSession();
|
||||
// Refresh the whole page to ensure cache is clear
|
||||
// and we dont end on an infinite loop
|
||||
window.location.href = "/login";
|
||||
window.location.href = "login";
|
||||
return;
|
||||
}
|
||||
return this.onError(err);
|
||||
@@ -71,7 +71,7 @@ export class API {
|
||||
return Promise.reject(throwMessage);
|
||||
} else {
|
||||
clearSession();
|
||||
window.location.href = "/login";
|
||||
window.location.href = "login";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ const Menu = ({
|
||||
userLoggedIn(false);
|
||||
localStorage.setItem("userLoggedIn", "");
|
||||
resetSession();
|
||||
history.push("/login");
|
||||
history.push("login");
|
||||
};
|
||||
api
|
||||
.invoke("POST", `/api/v1/logout`)
|
||||
|
||||
@@ -175,7 +175,7 @@ const LoginCallback = ({ classes }: ILoginCallBackProps) => {
|
||||
</Typography>
|
||||
<Button
|
||||
component={"a"}
|
||||
href="/login"
|
||||
href="login"
|
||||
type="submit"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
|
||||
Reference in New Issue
Block a user