MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / handleDelete

Function handleDelete

console/src/components/DeleteObjectModal.tsx:86–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}>

Callers

nothing calls this directly

Calls 2

onSuccessFunction · 0.85
onCloseFunction · 0.70

Tested by

no test coverage detected