eleven-solutions-common-website-unique-web 16.0.1 → 16.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
11
11
|
import React from "react";
|
12
12
|
import { useState, useEffect } from "react";
|
13
|
-
import { addTaxonomyApi, fetchTaxonomyByIdApi, updateTaxonomyApi, fetchTaxonomiessApi, addMultipleTaxonomiesApi, deleteTaxonomyApi,
|
13
|
+
import { addTaxonomyApi, fetchTaxonomyByIdApi, updateTaxonomyApi, fetchTaxonomiessApi, addMultipleTaxonomiesApi, deleteTaxonomyApi, addSubTypeApi, } from "../api/taxonomy";
|
14
14
|
import { FaPlus } from "react-icons/fa";
|
15
15
|
const TaxonomyForm = ({ url }) => {
|
16
16
|
const [type, setType] = useState("");
|
@@ -157,18 +157,6 @@ const TaxonomyForm = ({ url }) => {
|
|
157
157
|
// alert("Failed to add/update Taxonomy");
|
158
158
|
// }
|
159
159
|
// };
|
160
|
-
useEffect(() => {
|
161
|
-
const fetchIsMultiple = () => __awaiter(void 0, void 0, void 0, function* () {
|
162
|
-
try {
|
163
|
-
const result = yield isMultipleApi(url, type);
|
164
|
-
setIsMultiple(typeof result === "boolean");
|
165
|
-
}
|
166
|
-
catch (error) {
|
167
|
-
console.error("Error checking if taxonomy is multiple:", error);
|
168
|
-
}
|
169
|
-
});
|
170
|
-
fetchIsMultiple();
|
171
|
-
}, [type]);
|
172
160
|
const handleCancelClick = () => {
|
173
161
|
setType("");
|
174
162
|
setCode("");
|
package/package.json
CHANGED
@@ -200,19 +200,6 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
|
|
200
200
|
// }
|
201
201
|
// };
|
202
202
|
|
203
|
-
useEffect(() => {
|
204
|
-
const fetchIsMultiple = async () => {
|
205
|
-
try {
|
206
|
-
const result = await isMultipleApi(url, type);
|
207
|
-
setIsMultiple(typeof result === "boolean");
|
208
|
-
} catch (error) {
|
209
|
-
console.error("Error checking if taxonomy is multiple:", error);
|
210
|
-
}
|
211
|
-
};
|
212
|
-
|
213
|
-
fetchIsMultiple();
|
214
|
-
}, [type]);
|
215
|
-
|
216
203
|
const handleCancelClick = () => {
|
217
204
|
setType("");
|
218
205
|
setCode("");
|