eleven-solutions-common-website-unique-web 3.0.29 → 3.0.31
Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,7 @@ const TaxonomyForm = () => {
|
|
36
36
|
const queryParams = new URLSearchParams(window.location.search);
|
37
37
|
const id = queryParams.get("id");
|
38
38
|
console.log(id, type);
|
39
|
+
console.log(isEditMode);
|
39
40
|
// Fetch taxonomy data if id exists
|
40
41
|
useEffect(() => {
|
41
42
|
if (id) {
|
@@ -73,26 +74,26 @@ const TaxonomyForm = () => {
|
|
73
74
|
handleFetchSimilarTaxonomies();
|
74
75
|
}
|
75
76
|
}, [type]);
|
76
|
-
// useEffect(() => {
|
77
|
-
// if (window.location.pathname === "/taxinomies/taxonomyform") {
|
78
|
-
// setIsSimilarTaxonomyOpen(true);
|
79
|
-
// }
|
80
|
-
// }, []);
|
81
77
|
useEffect(() => {
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
}
|
86
|
-
// else {
|
87
|
-
// setIsSimilarTaxonomyOpen(false);
|
88
|
-
// }
|
89
|
-
};
|
90
|
-
handleLocationChange();
|
91
|
-
window.addEventListener("popstate", handleLocationChange);
|
92
|
-
return () => {
|
93
|
-
window.removeEventListener("popstate", handleLocationChange);
|
94
|
-
};
|
78
|
+
if (window.location.pathname === "/taxinomies/taxonomyform") {
|
79
|
+
setIsSimilarTaxonomyOpen(true);
|
80
|
+
}
|
95
81
|
}, []);
|
82
|
+
// useEffect(() => {
|
83
|
+
// const handleLocationChange = () => {
|
84
|
+
// if (window.location.pathname === "/taxonomy/taxonomyform") {
|
85
|
+
// setIsSimilarTaxonomyOpen(true);
|
86
|
+
// }
|
87
|
+
// else {
|
88
|
+
// setIsSimilarTaxonomyOpen(false);
|
89
|
+
// }
|
90
|
+
// };
|
91
|
+
// handleLocationChange();
|
92
|
+
// window.addEventListener("popstate", handleLocationChange);
|
93
|
+
// return () => {
|
94
|
+
// window.removeEventListener("popstate", handleLocationChange);
|
95
|
+
// };
|
96
|
+
// }, []);
|
96
97
|
const handleSubmit = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
97
98
|
event.preventDefault();
|
98
99
|
if (!validateForm())
|
package/package.json
CHANGED
@@ -59,6 +59,8 @@ const TaxonomyForm = () => {
|
|
59
59
|
|
60
60
|
console.log(id, type);
|
61
61
|
|
62
|
+
console.log(isEditMode);
|
63
|
+
|
62
64
|
// Fetch taxonomy data if id exists
|
63
65
|
useEffect(() => {
|
64
66
|
if (id) {
|
@@ -103,30 +105,30 @@ const TaxonomyForm = () => {
|
|
103
105
|
}
|
104
106
|
}, [type]);
|
105
107
|
|
106
|
-
// useEffect(() => {
|
107
|
-
// if (window.location.pathname === "/taxinomies/taxonomyform") {
|
108
|
-
// setIsSimilarTaxonomyOpen(true);
|
109
|
-
// }
|
110
|
-
// }, []);
|
111
|
-
|
112
108
|
useEffect(() => {
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
// else {
|
118
|
-
// setIsSimilarTaxonomyOpen(false);
|
119
|
-
// }
|
120
|
-
};
|
109
|
+
if (window.location.pathname === "/taxinomies/taxonomyform") {
|
110
|
+
setIsSimilarTaxonomyOpen(true);
|
111
|
+
}
|
112
|
+
}, []);
|
121
113
|
|
122
|
-
|
114
|
+
// useEffect(() => {
|
115
|
+
// const handleLocationChange = () => {
|
116
|
+
// if (window.location.pathname === "/taxonomy/taxonomyform") {
|
117
|
+
// setIsSimilarTaxonomyOpen(true);
|
118
|
+
// }
|
119
|
+
// else {
|
120
|
+
// setIsSimilarTaxonomyOpen(false);
|
121
|
+
// }
|
122
|
+
// };
|
123
123
|
|
124
|
-
|
124
|
+
// handleLocationChange();
|
125
125
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
126
|
+
// window.addEventListener("popstate", handleLocationChange);
|
127
|
+
|
128
|
+
// return () => {
|
129
|
+
// window.removeEventListener("popstate", handleLocationChange);
|
130
|
+
// };
|
131
|
+
// }, []);
|
130
132
|
|
131
133
|
const handleSubmit = async (event: React.MouseEvent<HTMLButtonElement>) => {
|
132
134
|
event.preventDefault();
|