MCPcopy Create free account
hub / github.com/chartbrew/chartbrew / _onDeleteChart

Function _onDeleteChart

client/src/containers/Chart/TextWidget.jsx:205–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203 }
204
205 const _onDeleteChart = () => {
206 setDeleteModal(false);
207 setChartLoading(true);
208 dispatch(removeChart({
209 project_id: params.projectId,
210 chart_id: chart.id,
211 }))
212 .then((response) => {
213 if (response?.error) {
214 toast.error("Error deleting the widget");
215 }
216
217 setChartLoading(false);
218 })
219 .catch(() => {
220 toast.error("Error deleting the widget");
221 setChartLoading(false);
222 });
223 }
224
225 const _onSaveContent = () => {
226 setChartLoading(true);

Callers

nothing calls this directly

Calls 2

removeChartFunction · 0.90
dispatchFunction · 0.50

Tested by

no test coverage detected