eleven-solutions-common-website-unique-web 2.0.29 → 2.0.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
11
  import { useState, useEffect } from "react";
12
- import { addTaxonomyApi, fetchTaxonomyByIdApi, updateTaxonomyApi, fetchTaxonomiessApi, addMultipleTaxonomiesApi, deleteTaxonomyApi, } from "../api/taxonomy";
12
+ import { addTaxonomyApi, fetchTaxonomyByIdApi, updateTaxonomyApi, fetchTaxonomiessApi, addMultipleTaxonomiesApi, deleteTaxonomyApi, isMultipleApi, } from "../api/taxonomy";
13
13
  import { FaPlus } from "react-icons/fa";
14
14
  const TaxonomyForm = () => {
15
15
  const [type, setType] = useState("");
@@ -120,17 +120,18 @@ const TaxonomyForm = () => {
120
120
  alert("Failed to add/update Taxonomy");
121
121
  }
122
122
  });
123
- // useEffect(() => {
124
- // const fetchIsMultiple = async () => {
125
- // try {
126
- // const result = await isMultipleApi(type);
127
- // setIsMultiple(typeof result === "boolean");
128
- // } catch (error) {
129
- // console.error("Error checking if taxonomy is multiple:", error);
130
- // }
131
- // };
132
- // fetchIsMultiple();
133
- // }, [type]);
123
+ useEffect(() => {
124
+ const fetchIsMultiple = () => __awaiter(void 0, void 0, void 0, function* () {
125
+ try {
126
+ const result = yield isMultipleApi(type);
127
+ setIsMultiple(typeof result === "boolean");
128
+ }
129
+ catch (error) {
130
+ console.error("Error checking if taxonomy is multiple:", error);
131
+ }
132
+ });
133
+ fetchIsMultiple();
134
+ }, [type]);
134
135
  const handleCancelClick = () => {
135
136
  setType("");
136
137
  setCode("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "2.0.29",
3
+ "version": "2.0.30",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -148,18 +148,18 @@ const TaxonomyForm = () => {
148
148
  }
149
149
  };
150
150
 
151
- // useEffect(() => {
152
- // const fetchIsMultiple = async () => {
153
- // try {
154
- // const result = await isMultipleApi(type);
155
- // setIsMultiple(typeof result === "boolean");
156
- // } catch (error) {
157
- // console.error("Error checking if taxonomy is multiple:", error);
158
- // }
159
- // };
160
-
161
- // fetchIsMultiple();
162
- // }, [type]);
151
+ useEffect(() => {
152
+ const fetchIsMultiple = async () => {
153
+ try {
154
+ const result = await isMultipleApi(type);
155
+ setIsMultiple(typeof result === "boolean");
156
+ } catch (error) {
157
+ console.error("Error checking if taxonomy is multiple:", error);
158
+ }
159
+ };
160
+
161
+ fetchIsMultiple();
162
+ }, [type]);
163
163
 
164
164
  const handleCancelClick = () => {
165
165
  setType("");