From 69fe906c7db4951449b312e00d727008fb295cab Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Tue, 26 Nov 2024 18:15:32 +0200 Subject: [PATCH] fix context decoding issue in Installed component (#563) remove redundant code correct encode decode Co-authored-by: Aleksandr Cupacenko --- frontend/src/App.tsx | 2 +- frontend/src/pages/Installed.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d70a7082..c7e4546a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -35,7 +35,7 @@ const PageLayout = () => { const SyncContext: React.FC = () => { const { context } = useParams(); if (context) { - apiService.setCluster(context); + apiService.setCluster(decodeURIComponent(context)); } return ; diff --git a/frontend/src/pages/Installed.tsx b/frontend/src/pages/Installed.tsx index 35090414..c536076d 100644 --- a/frontend/src/pages/Installed.tsx +++ b/frontend/src/pages/Installed.tsx @@ -21,7 +21,7 @@ function Installed() { const handleClusterChange = (clusterName: string) => { navigate({ - pathname: `/${clusterName}/installed`, + pathname: `/${encodeURIComponent(clusterName)}/installed`, }); };