Skip to content

Commit 991cc09

Browse files
authored
Make Login assets and redirects relative (#1854)
1 parent ef4587b commit 991cc09

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

portal-ui/src/ProtectedRoutes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const ProtectedRoute = ({
7272
return null;
7373
}
7474
// redirect user to the right page based on session status
75-
return loggedIn ? <Component /> : <Redirect to={{ pathname: "/login" }} />;
75+
return loggedIn ? <Component /> : <Redirect to={{ pathname: "login" }} />;
7676
};
7777

7878
const mapState = (state: AppState) => ({

portal-ui/src/Routes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const Routes = () => {
4646
children={(routerProps) => (
4747
<div
4848
style={{
49-
backgroundImage: `url('/images/background-wave-orig2.svg'), url('/images/background.svg')`,
49+
backgroundImage: `url('images/background-wave-orig2.svg'), url('images/background.svg')`,
5050
backgroundPosition: "center 250px, center center",
5151
backgroundRepeat: "no-repeat",
5252
backgroundSize: "2547px 980px,cover",

portal-ui/src/common/api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class API {
3737
clearSession();
3838
// Refresh the whole page to ensure cache is clear
3939
// and we dont end on an infinite loop
40-
window.location.href = "/login";
40+
window.location.href = "login";
4141
return;
4242
}
4343
return this.onError(err);
@@ -71,7 +71,7 @@ export class API {
7171
return Promise.reject(throwMessage);
7272
} else {
7373
clearSession();
74-
window.location.href = "/login";
74+
window.location.href = "login";
7575
}
7676
}
7777
}

portal-ui/src/screens/Console/Menu/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const Menu = ({
107107
userLoggedIn(false);
108108
localStorage.setItem("userLoggedIn", "");
109109
resetSession();
110-
history.push("/login");
110+
history.push("login");
111111
};
112112
api
113113
.invoke("POST", `/api/v1/logout`)

portal-ui/src/screens/LoginPage/LoginCallback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const LoginCallback = ({ classes }: ILoginCallBackProps) => {
175175
</Typography>
176176
<Button
177177
component={"a"}
178-
href="/login"
178+
href="login"
179179
type="submit"
180180
variant="contained"
181181
color="primary"

0 commit comments

Comments
 (0)