eleven-solutions-common-website-unique-web 2.0.22 → 2.0.23

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("");
@@ -121,17 +121,18 @@ const TaxonomyForm = () => {
121
121
  alert("Failed to add/update Taxonomy");
122
122
  }
123
123
  });
124
- // useEffect(() => {
125
- // const fetchIsMultiple = async () => {
126
- // try {
127
- // const result = await isMultipleApi(type);
128
- // setIsMultiple(typeof result === "boolean");
129
- // } catch (error) {
130
- // console.error("Error checking if taxonomy is multiple:", error);
131
- // }
132
- // };
133
- // fetchIsMultiple();
134
- // }, [type]);
124
+ useEffect(() => {
125
+ const fetchIsMultiple = () => __awaiter(void 0, void 0, void 0, function* () {
126
+ try {
127
+ const result = yield isMultipleApi(type);
128
+ setIsMultiple(typeof result === "boolean");
129
+ }
130
+ catch (error) {
131
+ console.error("Error checking if taxonomy is multiple:", error);
132
+ }
133
+ });
134
+ fetchIsMultiple();
135
+ }, [type]);
135
136
  const handleCancelClick = () => {
136
137
  setType("");
137
138
  setCode("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -149,18 +149,18 @@ const TaxonomyForm = () => {
149
149
  }
150
150
  };
151
151
 
152
- // useEffect(() => {
153
- // const fetchIsMultiple = async () => {
154
- // try {
155
- // const result = await isMultipleApi(type);
156
- // setIsMultiple(typeof result === "boolean");
157
- // } catch (error) {
158
- // console.error("Error checking if taxonomy is multiple:", error);
159
- // }
160
- // };
161
-
162
- // fetchIsMultiple();
163
- // }, [type]);
152
+ useEffect(() => {
153
+ const fetchIsMultiple = async () => {
154
+ try {
155
+ const result = await isMultipleApi(type);
156
+ setIsMultiple(typeof result === "boolean");
157
+ } catch (error) {
158
+ console.error("Error checking if taxonomy is multiple:", error);
159
+ }
160
+ };
161
+
162
+ fetchIsMultiple();
163
+ }, [type]);
164
164
 
165
165
  const handleCancelClick = () => {
166
166
  setType("");