From 41d4334e38312d0361e1326754b6822150c7bf73 Mon Sep 17 00:00:00 2001
From: Nhan Thanh Doan <83625759+nhandt2021@users.noreply.github.com>
Date: Fri, 1 Dec 2023 03:37:33 +0700
Subject: [PATCH] [Hot-fix] fix: remove redundant slash that cause proxy fail
(#3873)
---
ui/src/components/NavLink.jsx | 2 +-
ui/src/plugins/AppLogo.jsx | 2 +-
ui/src/plugins/fetch.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/src/components/NavLink.jsx b/ui/src/components/NavLink.jsx
index 9ccb93364f..3fd7b46234 100644
--- a/ui/src/components/NavLink.jsx
+++ b/ui/src/components/NavLink.jsx
@@ -26,7 +26,7 @@ export default React.forwardRef((props, ref) => {
);
} else {
- const href = absolutePath ? url.toString() : cleanDuplicateSlash(getBasename() + "/" + url.toString());
+ const href = absolutePath ? url.toString() : cleanDuplicateSlash(getBasename() + url.toString());
return (
{rest.children}
diff --git a/ui/src/plugins/AppLogo.jsx b/ui/src/plugins/AppLogo.jsx
index ad825e5bcd..aa29ec9963 100644
--- a/ui/src/plugins/AppLogo.jsx
+++ b/ui/src/plugins/AppLogo.jsx
@@ -13,6 +13,6 @@ const useStyles = makeStyles((theme) => ({
export default function AppLogo() {
const classes = useStyles();
- const logoPath = getBasename() + '/logo.svg';
+ const logoPath = getBasename() + 'logo.svg';
return ;
}
diff --git a/ui/src/plugins/fetch.js b/ui/src/plugins/fetch.js
index aabb5b1bdd..4467339ce1 100644
--- a/ui/src/plugins/fetch.js
+++ b/ui/src/plugins/fetch.js
@@ -17,7 +17,7 @@ export function fetchWithContext(
const newParams = { ...fetchParams };
const basename = getBasename();
- const newPath = basename + `/api/${path}`;
+ const newPath = basename + `api/${path}`;
const cleanPath = cleanDuplicateSlash(newPath); // Cleanup duplicated slashes
return fetch(cleanPath, newParams)