Skip to content

Commit 1dd29b4

Browse files
author
Krzysiek_QM
committed
v.3.3.3
- debugging
1 parent 5a55563 commit 1dd29b4

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

frontend/src/components/login/LoginPage.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Grid from "@material-ui/core/Grid";
2828
import {MessageBox} from "../utils/MessageBox";
2929
import {sortByKey} from "../../utils/JsonHelper";
3030
import {getManagementProjectsPath, getProjectDataPath} from "../../route/AppRouter";
31-
import {getBaseUrl} from "../../utils/UrlBuilder";
31+
import {getBaseUrl, getContextPath} from "../../utils/UrlBuilder";
3232
import ReactGA from 'react-ga';
3333

3434
const initialState = {
@@ -246,7 +246,6 @@ export default function LoginPage() {
246246
console.log("> 2: redirectTo: " + pathname);
247247
return redirectTo(pathname);
248248
}
249-
250249
case 1:
251250
return redirectTo(getManagementProjectsPath());
252251
default:

frontend/src/route/AppRouter.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ import {getContextPath} from "../utils/UrlBuilder";
1414

1515
export default function AppRouter() {
1616

17-
setPathname(window.location.pathname);
17+
const fullPathname = window.location.pathname;
18+
const pathname = fullPathname.replace(getContextPath(), "");
19+
20+
console.log("----save pathname -------------------------------------------");
21+
console.log("contextPath: " + getContextPath());
22+
console.log("fullPathname: " + fullPathname);
23+
console.log("pathname: " + pathname);
24+
console.log("-------------------------------------------------------------");
25+
26+
setPathname(pathname);
1827
return (
1928
<BrowserRouter
2029
basename={getContextPath()}

0 commit comments

Comments
 (0)