2
0
Эх сурвалжийг харах

persist cluster on refresh (#4329)

Feroze Mohideen 2 жил өмнө
parent
commit
19640a314e

+ 3 - 1
dashboard/src/main/home/sidebar/ClusterList.tsx

@@ -102,12 +102,14 @@ const ClusterList: React.FC = (props) => {
             );
             if (cluster) {
               // TODO: remove the need for this conversion
-              const clusterToOldType: ClusterType = {
+              // TODO: project_id is required for the current cluster to persist on page refresh - find out why
+              const clusterToOldType: ClusterType & { project_id: number } = {
                 id: cluster.id,
                 name: cluster.name,
                 vanity_name: cluster.vanity_name,
                 cloud_provider: cluster.cloud_provider.name,
                 status: cluster.status,
+                project_id: currentProject.id,
               };
               setCurrentCluster?.(clusterToOldType);
               pushFiltered(props, "/apps", ["project_id"], {});