From 45792cfd77715c7002442d4f5e073f42c89e6966 Mon Sep 17 00:00:00 2001 From: Wilson Neto Date: Fri, 17 Jan 2025 13:19:51 -0300 Subject: [PATCH] wip --- .../src/pages/TreeDetails/Tabs/Build/BuildTab.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx b/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx index a0977863..d83842aa 100644 --- a/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx +++ b/dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx @@ -4,8 +4,6 @@ import { useCallback, useMemo } from 'react'; import { useNavigate, useParams, useSearch } from '@tanstack/react-router'; -import type { ITreeDetails } from '@/pages/TreeDetails/TreeDetails'; - import TreeCommitNavigationGraph from '@/pages/TreeDetails/Tabs/TreeCommitNavigationGraph'; import MemoizedIssuesList from '@/components/Cards/IssuesList'; @@ -26,11 +24,12 @@ import { RedirectFrom, type TFilterObjectsKeys } from '@/types/general'; import type { TreeDetailsLazyLoaded } from '@/pages/useTreeDetailsLazyLoadQuery'; -import { sanitizeArchs } from '@/utils/utils'; +import { sanitizeArchs, sanitizeConfigs } from '@/utils/utils'; -import { TreeDetailsBuildsTable } from './TreeDetailsBuildsTable'; import QuerySwitcher from '@/components/QuerySwitcher/QuerySwitcher'; +import { TreeDetailsBuildsTable } from './TreeDetailsBuildsTable'; + interface BuildTab { treeDetailsLazyLoaded: TreeDetailsLazyLoaded; } @@ -74,7 +73,7 @@ const BuildTab = ({ treeDetailsLazyLoaded }: BuildTab): JSX.Element => { const { summary, builds } = treeDetailsLazyLoaded; const summaryData = summary.data?.summary.builds; - const { builds: buildsData, status } = builds; + const { data: buildsData, status } = builds; const archSummary = useMemo( () => sanitizeArchs(summaryData?.architectures), @@ -83,7 +82,7 @@ const BuildTab = ({ treeDetailsLazyLoaded }: BuildTab): JSX.Element => { const configsItems = useMemo( () => sanitizeConfigs(summaryData?.configs), - [summaryData.configs], + [summaryData?.configs], ); // This will never be empty because there is a null check in the grandparent component @@ -156,8 +155,7 @@ const BuildTab = ({ treeDetailsLazyLoaded }: BuildTab): JSX.Element => {
- - +