Skip to content

Commit a699374

Browse files
committed
Fixed navigation
1 parent b31bffa commit a699374

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

client/src/pages/System.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ const System = () => {
4545
const refreshRequired = name !== currentTab && organizationTabs.includes(name) &&
4646
organizationTabs.includes(currentTab);
4747
setCurrentTab(name);
48-
const path = encodeURIComponent(`/system/${name}`);
49-
navigate(refreshRequired ? `/refresh-route/${path}` : path);
48+
const newPath = `/system/${name}`;
49+
if (refreshRequired) {
50+
const encodedPath = encodeURIComponent(newPath);
51+
navigate(`/refresh-route/${encodedPath}`);
52+
} else {
53+
navigate(newPath, {replace: true});
54+
}
5055
}
5156

5257
const renderCurrentTab = () => {

0 commit comments

Comments
 (0)