Skip to content

Commit e41fcb4

Browse files
authored
fix(Header): no requests before capabilities loaded (#3203)
1 parent 25b7b12 commit e41fcb4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/containers/Header/Header.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function Header() {
7373

7474
const {isLoading: isClustersLoading, error: clustersError} =
7575
clustersApi.useGetClustersListQuery(undefined, {
76-
skip: !isClustersPage,
76+
skip: !isClustersPage || !capabilitiesLoaded,
7777
});
7878

7979
const isAddClusterAvailable =
@@ -93,7 +93,9 @@ function Header() {
9393
: skipToken;
9494

9595
const {currentData: databaseData, isLoading: isDatabaseDataLoading} =
96-
tenantApi.useGetTenantInfoQuery(params);
96+
tenantApi.useGetTenantInfoQuery(params, {
97+
skip: !capabilitiesLoaded,
98+
});
9799

98100
// Show Monitoring only when:
99101
// - ControlPlane exists AND has a non-empty id

0 commit comments

Comments
 (0)