From 19640a314e743113f20a1a84cebff2c0ac8302b1 Mon Sep 17 00:00:00 2001 From: Feroze Mohideen Date: Mon, 26 Feb 2024 11:52:52 -0500 Subject: [PATCH] persist cluster on refresh (#4329) --- dashboard/src/main/home/sidebar/ClusterList.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/src/main/home/sidebar/ClusterList.tsx b/dashboard/src/main/home/sidebar/ClusterList.tsx index d7bb0038c4..3d68481285 100644 --- a/dashboard/src/main/home/sidebar/ClusterList.tsx +++ b/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"], {});