Skip to content

Commit

Permalink
fix(client): relative paths in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
cgawron committed Sep 15, 2023
1 parent 5f1fced commit 133f7e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM node:18-bullseye as build
ARG REACT_APP_GOOGLE_ID=692793330469-6iupo55tt0kelejcie26m4njeckbmnv8.apps.googleusercontent.com
ARG REACT_APP_URL=/meeting
ARG REACT_BASE_PATH=/meeting
ARG REACT_APP_URL=https://www.ki.fh-swf.de/meeting
ARG REACT_APP_API_URI=https://www.ki.fh-swf.de/meeting/api/v1

ENV REACT_APP_GOOGLE_ID=${REACT_APP_GOOGLE_ID}
ENV REACT_BASE_PATH=${REACT_BASE_PATH}
ENV REACT_APP_URL=${REACT_APP_URL}
ENV REACT_APP_API_URI=${REACT_APP_API_URI}

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/AppNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const AppNavbar = () => {
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
const [snack, setSnack] = React.useState<string | null>(null);

const link = user ? process.env.REACT_APP_URL + "users/" + user.user_url : "";
const link = user ? process.env.REACT_APP_URL + "/users/" + user.user_url : "";

console.log("AppNavbar: user=%o", user);

Expand Down
2 changes: 1 addition & 1 deletion client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ root.render(
<GoogleOAuthProvider clientId={GOOGLE_ID}>
<LocalizationProvider dateAdapter={AdapterDateFns}>
<ThemeProvider theme={theme}>
<BrowserRouter basename={process.env.REACT_APP_URL}>
<BrowserRouter basename={process.env.REACT_BASE_PATH}>
<Routes>
<Route path="/" element={isAuthenticated() ? (
<Navigate to="/app" />
Expand Down

0 comments on commit 133f7e3

Please sign in to comment.