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