Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
WilsonNet committed Jan 17, 2025
1 parent 226f6f9 commit 45792cf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions dashboard/src/pages/TreeDetails/Tabs/Build/BuildTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
}
Expand Down Expand Up @@ -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),
Expand All @@ -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
Expand Down Expand Up @@ -156,8 +155,7 @@ const BuildTab = ({ treeDetailsLazyLoaded }: BuildTab): JSX.Element => {
<div className="text-lg">
<FormattedMessage id="global.builds" />
</div>

<TreeDetailsBuildsTable buildItems={buildsData.builds ?? []} />
<TreeDetailsBuildsTable buildItems={buildsData?.builds ?? []} />
</div>
</QuerySwitcher>
</div>
Expand Down

0 comments on commit 45792cf

Please sign in to comment.