eleven-solutions-common-website-unique-web 2.0.12 → 2.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,21 +83,15 @@ const UserForm = () => {
83
83
  yield addUserApi(userName, email, mobile, address, roleType);
84
84
  alert("User added successfully");
85
85
  }
86
- window.location.href = "/admin/users";
86
+ // window.location.href = "/admin/users";
87
+ window.history.pushState({}, "", "/admin/users");
88
+ window.dispatchEvent(new PopStateEvent("popstate"));
87
89
  }
88
90
  catch (error) {
89
91
  console.error("Error adding/updating User:", error);
90
92
  alert("Failed to add/update User");
91
93
  }
92
94
  });
93
- // const handleCancelClick = () => {
94
- // setUserName("");
95
- // setEmail("");
96
- // setMobile("");
97
- // setAddress("");
98
- // setRoleType("");
99
- // navigate("/admin/user");
100
- // };
101
95
  const handleCancelClick = () => {
102
96
  setUserName("");
103
97
  setEmail("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -91,22 +91,15 @@ const UserForm = () => {
91
91
  await addUserApi(userName, email, mobile, address, roleType);
92
92
  alert("User added successfully");
93
93
  }
94
- window.location.href = "/admin/users";
94
+ // window.location.href = "/admin/users";
95
+ window.history.pushState({}, "", "/admin/users");
96
+ window.dispatchEvent(new PopStateEvent("popstate"));
95
97
  } catch (error) {
96
98
  console.error("Error adding/updating User:", error);
97
99
  alert("Failed to add/update User");
98
100
  }
99
101
  };
100
102
 
101
- // const handleCancelClick = () => {
102
- // setUserName("");
103
- // setEmail("");
104
- // setMobile("");
105
- // setAddress("");
106
- // setRoleType("");
107
- // navigate("/admin/user");
108
- // };
109
-
110
103
  const handleCancelClick = () => {
111
104
  setUserName("");
112
105
  setEmail("");