eleven-solutions-common-website-unique-web 3.0.23 → 3.0.25

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.
@@ -120,6 +120,17 @@ 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
134
  useEffect(() => {
124
135
  const fetchIsMultiple = () => __awaiter(void 0, void 0, void 0, function* () {
125
136
  try {
@@ -131,7 +142,7 @@ const TaxonomyForm = () => {
131
142
  }
132
143
  });
133
144
  fetchIsMultiple();
134
- }, [type]);
145
+ }, [location.pathname, type]);
135
146
  const handleCancelClick = () => {
136
147
  setType("");
137
148
  setCode("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "3.0.23",
3
+ "version": "3.0.25",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -148,6 +148,19 @@ 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]);
163
+
151
164
  useEffect(() => {
152
165
  const fetchIsMultiple = async () => {
153
166
  try {
@@ -159,7 +172,7 @@ const TaxonomyForm = () => {
159
172
  };
160
173
 
161
174
  fetchIsMultiple();
162
- }, [type]);
175
+ }, [location.pathname, type]);
163
176
 
164
177
  const handleCancelClick = () => {
165
178
  setType("");
@@ -201,14 +201,7 @@ function Users() {
201
201
  />
202
202
  </svg>
203
203
  </button>
204
- {/*
205
- <a
206
- href={`/admin/users/userform?id=${user.id}`}
207
- onClick={(e) => {
208
- e.preventDefault();
209
- handleEditClick(user.id);
210
- }}
211
- > */}
204
+
212
205
  <button
213
206
  onClick={(event) =>
214
207
  handleEditClick(
@@ -347,28 +340,3 @@ function Users() {
347
340
  }
348
341
 
349
342
  export default Users;
350
-
351
- // import React from "react";
352
-
353
- // function Users() {
354
- // const handleNavigation = (event: React.MouseEvent, path: string) => {
355
- // event.preventDefault();
356
- // window.history.pushState({}, "", path);
357
- // window.dispatchEvent(new PopStateEvent("popstate"));
358
- // };
359
-
360
- // return (
361
- // <div>
362
- // Users
363
- // <button
364
- // type="button"
365
- // onClick={(event) => handleNavigation(event, "/admin/users/userform")}
366
- // className="flex items-center justify-center px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80"
367
- // >
368
- // User
369
- // </button>
370
- // </div>
371
- // );
372
- // }
373
-
374
- // export default Users;