瀏覽代碼

Use query params instead of url params

jnfrati 5 年之前
父節點
當前提交
d1c7fccaa9
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      dashboard/src/main/home/cluster-dashboard/dashboard/NamespaceList.tsx

+ 4 - 6
dashboard/src/main/home/cluster-dashboard/dashboard/NamespaceList.tsx

@@ -158,12 +158,10 @@ export const NamespaceList: React.FunctionComponent = () => {
             <StyledCard
               key={namespace?.metadata?.name}
               onClick={() =>
-                pushFiltered(
-                  { location, history },
-                  `/applications/${currentCluster.name}/${namespace.metadata.name}`,
-                  [],
-                  {}
-                )
+                pushFiltered({ location, history }, `/applications`, [], {
+                  cluster: currentCluster.name,
+                  namespace: namespace.metadata.name,
+                })
               }
             >
               <ContentContainer>