Skip to content

Commit 7fe6e2e

Browse files
committed
[TOOL-2995]: Fix Engine Contract Subscription UI issue with checkboxes
1 parent b14aa54 commit 7fe6e2e

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -324,21 +324,22 @@ const ModalBodyInputData = ({
324324
<FormLabel>Processed Data</FormLabel>
325325

326326
<div className="flex flex-col gap-2">
327-
<Checkbox
328-
{...form.register("processEventLogs")}
329-
checked={form.getValues("processEventLogs")}
330-
onCheckedChange={(val) => {
331-
const checked = !!val;
332-
form.setValue("processEventLogs", checked);
333-
if (checked) {
334-
processEventLogsDisclosure.onOpen();
335-
} else {
336-
processEventLogsDisclosure.onClose();
337-
}
338-
}}
339-
>
340-
<Text>Event Logs</Text>
341-
</Checkbox>
327+
<CheckboxWithLabel>
328+
<Checkbox
329+
{...form.register("processEventLogs")}
330+
checked={form.getValues("processEventLogs")}
331+
onCheckedChange={(val) => {
332+
const checked = !!val;
333+
form.setValue("processEventLogs", checked);
334+
if (checked) {
335+
processEventLogsDisclosure.onOpen();
336+
} else {
337+
processEventLogsDisclosure.onClose();
338+
}
339+
}}
340+
/>
341+
<span>Event Logs</span>
342+
</CheckboxWithLabel>
342343
{/* Shows all/specific events if processing event logs */}
343344
<Collapse in={processEventLogsDisclosure.isOpen}>
344345
<div className="flex flex-col gap-2 px-4">
@@ -394,7 +395,7 @@ const ModalBodyInputData = ({
394395
}
395396
}}
396397
/>
397-
<Text>Transaction Receipts</Text>
398+
<span>Transaction Receipts</span>
398399
</CheckboxWithLabel>
399400
{/* Shows all/specific functions if processing transaction receipts */}
400401
<Collapse in={processTransactionReceiptsDisclosure.isOpen}>
@@ -551,9 +552,10 @@ const FilterSelector = ({
551552
onChange={(selected: string[]) => setFilter(selected)}
552553
>
553554
{filterNames.map((name) => (
554-
<Checkbox key={name} value={name}>
555-
<Text>{name}</Text>
556-
</Checkbox>
555+
<CheckboxWithLabel key={name}>
556+
<Checkbox value={name} />
557+
<span>{name}</span>
558+
</CheckboxWithLabel>
557559
))}
558560
</CheckboxGroup>
559561
</div>

apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ export const BatchLazyMint: ComponentWithChildren<
251251
{form.watch("revealType") && (
252252
<>
253253
<CheckboxWithLabel>
254-
<Checkbox {...form.register("shuffle")} className="mt-3" />
254+
<Checkbox
255+
{...form.register("shuffle")}
256+
className="mt-3"
257+
onCheckedChange={(val) => form.setValue("shuffle", !!val)}
258+
/>
255259
<div className="flex flex-col items-center gap-1 md:flex-row">
256260
<p>Shuffle the order of the NFTs before uploading.</p>
257261
<em>This is an off-chain operation and is not provable.</em>

0 commit comments

Comments
 (0)