| 84 | }); |
| 85 | |
| 86 | const handleDelete = () => { |
| 87 | track("Delete object clicked", { name: dbObject.name }); |
| 88 | deleteObject( |
| 89 | { dbObject, objectType }, |
| 90 | { |
| 91 | onSuccess: () => { |
| 92 | onClose(); |
| 93 | onSuccess(); |
| 94 | toast({ |
| 95 | description: ( |
| 96 | <ObjectToastDescription |
| 97 | name={dbObject.name} |
| 98 | message="dropped successfully" |
| 99 | /> |
| 100 | ), |
| 101 | }); |
| 102 | }, |
| 103 | onError: (errorMessage) => { |
| 104 | Sentry.captureException( |
| 105 | new Error("Drop object error: " + errorMessage), |
| 106 | ); |
| 107 | }, |
| 108 | }, |
| 109 | ); |
| 110 | }; |
| 111 | |
| 112 | return ( |
| 113 | <Modal isOpen={isOpen} onClose={onClose}> |