fix context decoding issue in Installed component (#563)

remove redundant code

correct encode decode

Co-authored-by: Aleksandr Cupacenko <alcu@danskebank.lt>
This commit is contained in:
Aleksandr Cupacenko
2024-11-26 18:15:32 +02:00
committed by GitHub
parent 3b0b44f392
commit 69fe906c7d
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ const PageLayout = () => {
const SyncContext: React.FC = () => {
const { context } = useParams();
if (context) {
apiService.setCluster(context);
apiService.setCluster(decodeURIComponent(context));
}
return <Outlet />;

View File

@@ -21,7 +21,7 @@ function Installed() {
const handleClusterChange = (clusterName: string) => {
navigate({
pathname: `/${clusterName}/installed`,
pathname: `/${encodeURIComponent(clusterName)}/installed`,
});
};