@campxdev/campx-web-utils 0.3.6 → 0.3.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/campx-web-utils",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "peerDependencies": {
@@ -5,13 +5,15 @@ import { motion } from 'framer-motion';
5
5
  import Cookies from 'js-cookie';
6
6
  import { Suspense, useState } from 'react';
7
7
  import { axios } from '../config/axios';
8
- import { ApplicationStore, ErrorBoundary } from '../context/export';
8
+ import { ErrorBoundary } from '../context/export';
9
9
 
10
10
  interface Props {
11
11
  children?: React.ReactNode;
12
12
  menu: SideMenuItemProps[];
13
13
  mainContainerSx?: any;
14
14
  handleLogout?: any;
15
+ userName?: string;
16
+ designation?: string;
15
17
  }
16
18
 
17
19
  export const AppLayout: React.FC<Props> = ({
@@ -19,12 +21,12 @@ export const AppLayout: React.FC<Props> = ({
19
21
  menu,
20
22
  mainContainerSx,
21
23
  handleLogout,
24
+ userName = '',
25
+ designation = '',
22
26
  }) => {
23
27
  const [collapsed, setCollapsed] = useState(true);
24
28
  const theme = useTheme();
25
29
 
26
- const user = ApplicationStore.useState((s) => s.user);
27
-
28
30
  function logout() {
29
31
  axios
30
32
  .post('/auth-server/auth/logout')
@@ -62,8 +64,8 @@ export const AppLayout: React.FC<Props> = ({
62
64
  showActiveDevices={false}
63
65
  onLogoutClick={handleLogout ?? logout}
64
66
  clientName={''}
65
- userFullName={user ? user?.fullName : ''}
66
- designation={user?.email}
67
+ userFullName={userName}
68
+ designation={designation}
67
69
  />
68
70
  <Box
69
71
  sx={{