eleven-solutions-common-website-unique-web 3.0.29 → 3.0.31

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.
@@ -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
- 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
- };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "3.0.29",
3
+ "version": "3.0.31",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -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
- const handleLocationChange = () => {
114
- if (window.location.pathname === "/taxonomy/taxonomyform") {
115
- setIsSimilarTaxonomyOpen(true);
116
- }
117
- // else {
118
- // setIsSimilarTaxonomyOpen(false);
119
- // }
120
- };
109
+ if (window.location.pathname === "/taxinomies/taxonomyform") {
110
+ setIsSimilarTaxonomyOpen(true);
111
+ }
112
+ }, []);
121
113
 
122
- handleLocationChange();
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
- window.addEventListener("popstate", handleLocationChange);
124
+ // handleLocationChange();
125
125
 
126
- return () => {
127
- window.removeEventListener("popstate", handleLocationChange);
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();