eleven-solutions-common-website-unique-web 22.0.10 → 22.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,9 +32,9 @@ const UserForm = ({ url }) => {
32
32
  const queryParams = new URLSearchParams(window.location.search);
33
33
  const id = queryParams.get("id");
34
34
  useEffect(() => {
35
- if (id) {
36
- const fetchUserData = () => __awaiter(void 0, void 0, void 0, function* () {
37
- try {
35
+ try {
36
+ if (id) {
37
+ const fetchUserData = () => __awaiter(void 0, void 0, void 0, function* () {
38
38
  const fetchedUser = yield fetchUserByIdApi(url, id);
39
39
  if (fetchedUser) {
40
40
  const user = fetchedUser;
@@ -47,15 +47,15 @@ const UserForm = ({ url }) => {
47
47
  setRoleType(user.roleType);
48
48
  setGender(user.gender);
49
49
  }
50
- }
51
- catch (error) {
52
- console.error("Unable to fetch user data", error);
53
- toast.error("Failed to fetch user data");
54
- setLoading(false);
55
- setHasError(true);
56
- }
57
- });
58
- fetchUserData();
50
+ });
51
+ fetchUserData();
52
+ }
53
+ }
54
+ catch (error) {
55
+ console.error("Error fetching User:", error);
56
+ toast.error("Failed to fetch the User.", { id: "fetchUserError" });
57
+ setLoading(false);
58
+ setHasError(true);
59
59
  }
60
60
  }, [id]);
61
61
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "22.0.10",
3
+ "version": "22.0.11",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"