Skip to content

Commit 30ad184

Browse files
committed
feat: add button to view tasks for deals with null dataset in buildDealDetails
1 parent 0052631 commit 30ad184

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/modules/deals/deal/buildDealDetails.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { DealQuery } from '@/graphql/poco/graphql';
22
import CopyButton from '@/components/CopyButton';
33
import SmartLinkGroup from '@/components/SmartLinkGroup';
4+
import { Button } from '@/components/ui/button';
45
import Bytes from '@/modules/Bytes';
56
import JsonBlock from '@/modules/JsonBlock';
67
import DealEvent from '@/modules/events/DealEvent';
@@ -14,9 +15,11 @@ import { truncateAddress } from '@/utils/truncateAddress';
1415
export function buildDealDetails({
1516
deal,
1617
isConnected,
18+
onSeeTasks,
1719
}: {
1820
deal: DealQuery['deal'];
1921
isConnected: boolean;
22+
onSeeTasks: () => void;
2023
}) {
2124
if (!deal) {
2225
return {};
@@ -133,6 +136,21 @@ export function buildDealDetails({
133136
),
134137
'Dataset price': <p>{deal.datasetPrice}</p>,
135138
}),
139+
...(deal.dataset === null && {
140+
Dataset: (
141+
<p>
142+
Bulk usage{' '}
143+
<Button
144+
variant="link"
145+
size="none"
146+
className="ml-1"
147+
onClick={onSeeTasks}
148+
>
149+
(see tasks for details)
150+
</Button>
151+
</p>
152+
),
153+
}),
136154
...(deal.workerpool && {
137155
Workerpool: (
138156
<div className="flex flex-wrap items-center gap-1">

0 commit comments

Comments
 (0)