analytica-frontend-lib 1.4.58 → 1.4.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22276,6 +22276,18 @@ var CreateActivity = ({
|
|
|
22276
22276
|
}
|
|
22277
22277
|
lastFetchedActivityIdRef.current = idParam;
|
|
22278
22278
|
} catch (error) {
|
|
22279
|
+
const status = error?.response?.status;
|
|
22280
|
+
if (status === 404) {
|
|
22281
|
+
addToast({
|
|
22282
|
+
title: "Atividade j\xE1 publicada",
|
|
22283
|
+
description: "Atividades publicadas n\xE3o podem ser editadas. Voc\xEA pode editar rascunhos e modelos.",
|
|
22284
|
+
variant: "solid",
|
|
22285
|
+
action: "info",
|
|
22286
|
+
position: "top-right"
|
|
22287
|
+
});
|
|
22288
|
+
handleBack();
|
|
22289
|
+
return;
|
|
22290
|
+
}
|
|
22279
22291
|
console.error("Erro ao buscar rascunho da atividade:", error);
|
|
22280
22292
|
addToast({
|
|
22281
22293
|
title: "Erro ao carregar atividade",
|
|
@@ -22293,7 +22305,7 @@ var CreateActivity = ({
|
|
|
22293
22305
|
}
|
|
22294
22306
|
};
|
|
22295
22307
|
fetchActivityDraft();
|
|
22296
|
-
}, [idParam, apiClient, addToast, draftEndpoint]);
|
|
22308
|
+
}, [idParam, apiClient, addToast, draftEndpoint, handleBack]);
|
|
22297
22309
|
(0, import_react60.useEffect)(() => {
|
|
22298
22310
|
if (shouldUpdateUrl(activity?.id, activity?.type, typeParam, idParam)) {
|
|
22299
22311
|
const urlType = getTypeFromUrl(activity.type);
|