@visns-studio/visns-components 5.0.1 → 5.0.2

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.
package/package.json CHANGED
@@ -75,7 +75,7 @@
75
75
  "react-dom": "^17.0.0 || ^18.0.0"
76
76
  },
77
77
  "name": "@visns-studio/visns-components",
78
- "version": "5.0.1",
78
+ "version": "5.0.2",
79
79
  "description": "Various packages to assist in the development of our Custom Applications.",
80
80
  "main": "src/index.js",
81
81
  "files": [
@@ -294,47 +294,6 @@ function Navigation({
294
294
  };
295
295
 
296
296
  const renderNav = (n) => {
297
- const iconComponents = {
298
- arrowCycle: ArrowCycle,
299
- bookClose: BookClose,
300
- bookOpen: BookOpen,
301
- briefcase: Briefcase,
302
- calendar: Calendar,
303
- chatDots: ChatDots,
304
- clipboard: Clipboard,
305
- doubleSword: DoubleSword,
306
- draft: Draft,
307
- envelope: Envelope,
308
- file: File,
309
- folder: Folder,
310
- folderAdd: FolderAdd,
311
- gear: Gear,
312
- grid: Grid,
313
- home: Home,
314
- homeAlt1: HomeAlt1,
315
- inbox: Inbox,
316
- info: Info,
317
- lightBulb: LightBulb,
318
- microphone: Microphone,
319
- money: Money,
320
- newspaper: Newspaper,
321
- paper: Paper,
322
- peopleGroup: PeopleGroup,
323
- peopleMultiple: PeopleMultiple,
324
- question: Question,
325
- questionFill: QuestionFill,
326
- search: Search,
327
- settingsVertical: SettingsVertical,
328
- signOut: SignOut,
329
- shippingBoxV1: ShippingBoxV1,
330
- statisticUp: StatisticUp,
331
- textAlignLeft: TextAlignLeft,
332
- ticket: Ticket,
333
- utensils: Utensils,
334
- };
335
-
336
- const IconComponent = iconComponents[n.icon];
337
-
338
297
  let navItemClasses;
339
298
 
340
299
  if (n.class.includes('active')) {
@@ -101,10 +101,12 @@ const Profile = ({ userProfile, setUserProfile }) => {
101
101
  payload
102
102
  );
103
103
 
104
+ const updatedUserData = res.data.user ? res.data.user : res.data;
105
+
104
106
  setUserProfile((prevState) => ({
105
107
  ...prevState,
106
- name: res.data.user.name,
107
- signature: res.data.user.signature,
108
+ name: updatedUserData.name,
109
+ signature: updatedUserData.signature,
108
110
  }));
109
111
  toast.success('Your profile has been successfully updated.');
110
112
  } catch (err) {