eleven-solutions-common-website-unique-web 1.0.27 → 1.0.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,10 @@ function Users() {
27
27
  }, []);
28
28
  const handleNav = (e) => {
29
29
  e.preventDefault();
30
- window.location.href = "/users/userform";
30
+ window.history.pushState({}, "", "/admin/users/userform");
31
+ // Trigger React's routing logic manually if required
32
+ const navEvent = new PopStateEvent("popstate");
33
+ window.dispatchEvent(navEvent);
31
34
  };
32
35
  const [currentPage, setCurrentPage] = useState(1);
33
36
  const itemsPerPage = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -21,7 +21,11 @@ function Users() {
21
21
  }, []);
22
22
  const handleNav = (e: React.FormEvent) => {
23
23
  e.preventDefault();
24
- window.location.href = "/users/userform";
24
+ window.history.pushState({}, "", "/admin/users/userform");
25
+
26
+ // Trigger React's routing logic manually if required
27
+ const navEvent = new PopStateEvent("popstate");
28
+ window.dispatchEvent(navEvent);
25
29
  };
26
30
 
27
31
  const [currentPage, setCurrentPage] = useState(1);