Skip to content

Commit c6d1f79

Browse files
committed
[Dashboard] Handle loading state for marketplace ui (#4321)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving error handling in the `list-form.tsx` file by setting `isFormLoading` to false when an error occurs during NFT approval. ### Detailed summary - Added `setIsFormLoading(false)` to handle error in NFT approval process. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 3b7890c commit c6d1f79

File tree

1 file changed

+1
-0
lines changed
  • apps/dashboard/src/contract-ui/tabs/listings/components

1 file changed

+1
-0
lines changed

apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
215215
try {
216216
await sendAndConfirmTx.mutateAsync(approveTx);
217217
} catch {
218+
setIsFormLoading(false);
218219
return toast.error("Failed to approve NFT for marketplace");
219220
}
220221
}

0 commit comments

Comments
 (0)