Skip to content

Commit 48cd773

Browse files
committed
Fixes quotas page
1 parent a6454a9 commit 48cd773

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

frontend/src/components/pages/quotas/quotas-list.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Alert, AlertIcon, Button, DataTable, Result, Skeleton } from '@redpanda
1414
import { useQuery } from '@tanstack/react-query';
1515
import { SkipIcon } from 'components/icons';
1616
import { config } from 'config';
17-
import { useMemo } from 'react';
17+
import { useLayoutEffect, useMemo } from 'react';
1818

1919
import {
2020
Quota_EntityType,
@@ -23,6 +23,7 @@ import {
2323
} from '../../../protogen/redpanda/api/dataplane/v1/quota_pb';
2424
import { listQuotas } from '../../../protogen/redpanda/api/dataplane/v1/quota-QuotaService_connectquery';
2525
import type { QuotaResponse, QuotaResponseSetting } from '../../../state/rest-interfaces';
26+
import { uiState } from '../../../state/ui-state';
2627
import { InfoText } from '../../../utils/tsx-utils';
2728
import { prettyBytes, prettyNumber } from '../../../utils/utils';
2829
import PageContent from '../../misc/page-content';
@@ -96,6 +97,13 @@ const useQuotasQuery = () => {
9697
};
9798

9899
const QuotasList = () => {
100+
// Set page title and breadcrumbs using useLayoutEffect for synchronous execution
101+
// This runs before browser paint, ensuring header renders immediately (fixes CI E2E tests)
102+
useLayoutEffect(() => {
103+
uiState.pageBreadcrumbs = [{ title: 'Quotas', linkTo: '/quotas' }];
104+
uiState.pageTitle = 'Quotas';
105+
}, []);
106+
99107
const { data, error, isLoading } = useQuotasQuery();
100108

101109
const quotasData = useMemo(() => {

0 commit comments

Comments
 (0)