Skip to content

Commit

Permalink
Fix the URL for the "about" configuration in the admin UI
Browse files Browse the repository at this point in the history
The admin UI can fetch HTML files from the `ui-config` module
to display in its "about" view which you can reach by the links
in the footer. (If you have that feature enabled.)

The URL used to fetch these was a relative one, which works
in "dev mode" since the site is served from the root,
but it doesn't work in production, where the link is resolved
relative to `/admin-ui`.
  • Loading branch information
JulianKniephoff committed Aug 13, 2024
1 parent 9f84e67 commit 4e2d3c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const About: React.FC = () => {

useEffect(() => {
const getURL = (language: string) => {
return `ui/config/admin-ui/${location.pathname.split("/").pop()}.${language}.html`;
return `/ui/config/admin-ui/${location.pathname.split("/").pop()}.${language}.html`;
};

axios.get(getURL(i18n.language))
Expand Down

0 comments on commit 4e2d3c4

Please sign in to comment.