-
- {props.query.failureCount > 2 ? 'Still loading...' : 'Loading...'}
-
+
{maxFailureCount > 2 ? 'Still loading...' : 'Loading...'}
);
};
diff --git a/web/vtadmin/src/components/routes/Clusters.tsx b/web/vtadmin/src/components/routes/Clusters.tsx
index b40892f4d01..5d2cf439a9b 100644
--- a/web/vtadmin/src/components/routes/Clusters.tsx
+++ b/web/vtadmin/src/components/routes/Clusters.tsx
@@ -24,14 +24,15 @@ import { DataCell } from '../dataTable/DataCell';
import { ContentContainer } from '../layout/ContentContainer';
import { WorkspaceHeader } from '../layout/WorkspaceHeader';
import { WorkspaceTitle } from '../layout/WorkspaceTitle';
+import { QueryLoadingPlaceholder } from '../placeholders/QueryLoadingPlaceholder';
export const Clusters = () => {
useDocumentTitle('Clusters');
- const { data } = useClusters();
+ const clustersQuery = useClusters();
const rows = React.useMemo(() => {
- return orderBy(data, ['name']);
- }, [data]);
+ return orderBy(clustersQuery.data, ['name']);
+ }, [clustersQuery.data]);
const renderRows = (rows: pb.Cluster[]) =>
rows.map((cluster, idx) => (
@@ -50,6 +51,7 @@ export const Clusters = () => {