ui-soxo-bootstrap-core 2.6.1-dev.2 → 2.6.1-dev.20

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.
Files changed (66) hide show
  1. package/core/components/extra-info/extra-info-details.js +2 -2
  2. package/core/components/index.js +2 -11
  3. package/core/components/landing-api/landing-api.js +91 -15
  4. package/core/components/landing-api/landing-api.scss +22 -0
  5. package/core/components/license-management/license-alert.js +97 -0
  6. package/core/lib/Store.js +3 -3
  7. package/core/lib/components/global-header/animations.js +78 -4
  8. package/core/lib/components/global-header/global-header.js +224 -255
  9. package/core/lib/components/global-header/global-header.scss +162 -24
  10. package/core/lib/components/sidemenu/animations.js +84 -2
  11. package/core/lib/components/sidemenu/sidemenu.js +191 -65
  12. package/core/lib/components/sidemenu/sidemenu.scss +221 -14
  13. package/core/lib/elements/basic/country-phone-input/country-phone-input.js +14 -8
  14. package/core/lib/elements/basic/dragabble-wrapper/draggable-wrapper.js +1 -1
  15. package/core/lib/elements/basic/menu-tree/menu-tree.js +26 -13
  16. package/core/lib/models/forms/components/form-creator/form-creator.scss +4 -3
  17. package/core/lib/models/menus/components/menu-list/menu-list.js +424 -467
  18. package/core/lib/models/process/components/process-dashboard/process-dashboard.js +469 -3
  19. package/core/lib/models/process/components/process-dashboard/process-dashboard.scss +4 -0
  20. package/core/lib/pages/change-password/change-password.js +17 -24
  21. package/core/lib/pages/change-password/change-password.scss +45 -48
  22. package/core/lib/pages/login/commnication-mode-selection.js +2 -2
  23. package/core/lib/pages/login/login.js +47 -62
  24. package/core/lib/pages/login/login.scss +9 -0
  25. package/core/lib/pages/login/reset-password.js +17 -17
  26. package/core/lib/pages/login/reset-password.scss +10 -1
  27. package/core/lib/pages/profile/themes.json +4 -4
  28. package/core/lib/utils/api/api.utils.js +30 -18
  29. package/core/lib/utils/common/common.utils.js +49 -35
  30. package/core/lib/utils/http/http.utils.js +2 -1
  31. package/core/lib/utils/index.js +4 -1
  32. package/core/models/base/base.js +7 -3
  33. package/core/models/core-scripts/core-scripts.js +134 -126
  34. package/core/models/doctor/components/doctor-add/doctor-add.js +9 -4
  35. package/core/models/menus/components/menu-add/menu-add.js +1 -1
  36. package/core/models/menus/components/menu-lists/menu-lists.js +53 -54
  37. package/core/models/menus/menus.js +27 -2
  38. package/core/models/roles/components/role-add/role-add.js +92 -59
  39. package/core/models/roles/components/role-list/role-list.js +1 -1
  40. package/core/models/staff/components/staff-add/staff-add.js +20 -32
  41. package/core/models/users/components/assign-role/assign-role.js +145 -50
  42. package/core/models/users/components/assign-role/assign-role.scss +209 -45
  43. package/core/models/users/components/assign-role/avatar-props.js +45 -0
  44. package/core/models/users/components/user-add/user-add.js +46 -55
  45. package/core/models/users/components/user-add/user-edit.js +25 -4
  46. package/core/models/users/users.js +9 -1
  47. package/core/modules/dashboard/components/dashboard-card/menu-dashboard-card.js +1 -1
  48. package/core/modules/reporting/components/reporting-dashboard/README.md +316 -0
  49. package/core/modules/reporting/components/reporting-dashboard/adavance-search/advance-search.js +147 -0
  50. package/core/modules/reporting/components/reporting-dashboard/adavance-search/advance-search.scss +76 -0
  51. package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.js +90 -0
  52. package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.test.js +74 -0
  53. package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.js +252 -0
  54. package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.test.js +126 -0
  55. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +326 -436
  56. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.scss +7 -0
  57. package/core/modules/steps/action-buttons.js +33 -15
  58. package/core/modules/steps/action-buttons.scss +55 -9
  59. package/core/modules/steps/chat-assistant.js +141 -0
  60. package/core/modules/steps/openai-realtime.js +275 -0
  61. package/core/modules/steps/readme.md +167 -0
  62. package/core/modules/steps/steps.js +1078 -57
  63. package/core/modules/steps/steps.scss +539 -90
  64. package/core/modules/steps/timeline.js +21 -19
  65. package/core/modules/steps/voice-navigation.js +709 -0
  66. package/package.json +2 -1
@@ -3,61 +3,54 @@
3
3
  * Global header component
4
4
  */
5
5
 
6
- import React, { useState, useEffect, useContext,useRef } from "react";
6
+ import React, { useState, useEffect, useContext, useRef } from 'react';
7
7
 
8
- import { animationControls, motion, useAnimation } from "framer-motion";
8
+ import { motion, useAnimation, useReducedMotion } from 'framer-motion';
9
9
 
10
10
  import {
11
11
  boxVariants,
12
- } from "./animations"
12
+ contentRevealVariants,
13
+ headerActionItemVariants,
14
+ headerActionsVariants,
15
+ headerClusterVariants,
16
+ headerShellVariants,
17
+ } from './animations';
13
18
 
14
- import { GlobalContext } from "./../../Store";
19
+ import { GlobalContext } from './../../Store';
15
20
 
16
- import { Link, useLocation } from "react-router-dom";
21
+ import { Link, useLocation } from 'react-router-dom';
17
22
 
18
- import { Typography, Avatar ,Input} from "antd";
23
+ import { Typography, Avatar, Input } from 'antd';
19
24
 
25
+ import ProgressBar from '../progress-bar/progress-bar'; // Adjust the path as needed
20
26
 
27
+ import { Button } from '../../elements';
21
28
 
22
- import ProgressBar from "../progress-bar/progress-bar"; // Adjust the path as needed
29
+ import GenericHeader from '../header/generic-header';
23
30
 
24
- import { Button } from "../../elements";
31
+ import { MenuOutlined, UserOutlined, SettingOutlined } from '@ant-design/icons';
25
32
 
33
+ import { Drawer } from 'antd';
26
34
 
35
+ import { ReloadOutlined, SearchOutlined } from '@ant-design/icons';
27
36
 
28
- import GenericHeader from "../header/generic-header";
37
+ import SideMenu from './../sidemenu/sidemenu';
29
38
 
30
- import {
31
- MenuOutlined,
32
- UserOutlined,
33
- SettingOutlined,
34
- } from "@ant-design/icons";
35
-
36
- import { Drawer } from "antd";
37
-
38
- import { ReloadOutlined, SearchOutlined } from "@ant-design/icons";
39
-
40
- import SideMenu from "./../sidemenu/sidemenu";
41
-
42
- import "./global-header.scss";
39
+ import './global-header.scss';
43
40
 
44
- import LanguageSwitcher from "../language-switcher/language-switcher";
41
+ import LanguageSwitcher from '../language-switcher/language-switcher';
45
42
 
46
- import { useTranslation } from "react-i18next";
47
-
48
-
49
- import BorderStyle from "pdf-lib/cjs/core/annotation/BorderStyle";
50
-
51
- import SettingsUtil from "../../../utils/settings.utils";
52
- import { SpotlightSearch } from "..";
43
+ import { useTranslation } from 'react-i18next';
53
44
 
45
+ import BorderStyle from 'pdf-lib/cjs/core/annotation/BorderStyle';
54
46
 
47
+ import SettingsUtil from '../../../utils/settings.utils';
48
+ import SpotlightSearch from '../spotlight-search/spotlight-search.component';
49
+ import { LicenseAlert } from '../../../components';
50
+ // import { MenusAPI } from '../../../models';
55
51
 
56
52
  const { Title } = Typography;
57
53
 
58
-
59
-
60
-
61
54
  export default function GlobalHeader({
62
55
  loading,
63
56
  appSettings,
@@ -68,48 +61,37 @@ export default function GlobalHeader({
68
61
  sidemenu = [],
69
62
  reload,
70
63
  meta = {},
64
+ licenseData,
65
+ licAlert,
71
66
  ...props
72
67
  }) {
73
-
74
68
  let location = useLocation();
75
69
  // let location = {};
76
70
 
77
-
78
-
79
71
  const { isMobile, user = { locations: [] }, kiosk, state } = useContext(GlobalContext);
80
72
 
81
-
82
-
83
73
  const [visible, setVisible] = useState(false);
84
74
 
85
75
  // Variable to handle toggling of menu
86
76
  const [collapsed, setCollapsed] = useState(false);
87
77
  // varibale handle branch switcher
88
78
 
89
-
90
-
91
79
  // const [searchModalVisible, setSearchModalVisible] = useState(false);
92
80
 
93
-
94
- const { globalCustomerHeader = () => { } } = appSettings;
81
+ const { globalCustomerHeader = () => {} } = appSettings;
95
82
 
96
83
  const { t, i18n } = useTranslation();
84
+ const reduceMotion = useReducedMotion();
85
+ const shouldAnimate = !reduceMotion;
97
86
 
98
87
  const spotlightRef = useRef();
99
88
 
100
89
  useEffect(() => {
101
-
102
90
  setTimeout(() => {
103
-
104
91
  i18n.changeLanguage(localStorage.selectedLanguage);
105
-
106
- }, 0)
107
-
108
-
92
+ }, 0);
93
+ // fetchSummary();
109
94
  }, []);
110
-
111
-
112
-
113
95
 
114
96
  /**
115
97
  * Function to handle toggling of menu
@@ -125,9 +107,6 @@ export default function GlobalHeader({
125
107
  // input to avoid typing
126
108
  SettingsUtil.openSpotlightModal();
127
109
  };
128
-
129
-
130
-
131
110
 
132
111
  /**
133
112
  * Function to remove toggling on mobile view
@@ -156,79 +135,49 @@ export default function GlobalHeader({
156
135
  const boxControls = useAnimation();
157
136
 
158
137
  async function animate() {
159
- await boxControls.start("entered");
138
+ if (!shouldAnimate) {
139
+ boxControls.set('entered');
140
+ return;
141
+ }
142
+
143
+ await boxControls.start('entered');
160
144
 
161
145
  //await boxControls.start("show");
162
146
  }
163
147
 
164
148
  useEffect(() => {
165
-
166
149
  animate();
167
- }, [])
168
-
169
- useEffect(() => {
150
+ }, [shouldAnimate]);
170
151
 
171
- }, [state.theme]);
172
-
173
-
174
-
175
-
176
-
152
+ useEffect(() => {}, [state.theme]);
177
153
 
154
+ const motionProps = shouldAnimate ? { initial: 'hidden', animate: 'visible' } : { initial: false, animate: false };
178
155
 
179
156
  return (
180
- <div
181
- className={`global-header ${process.env.REACT_APP_THEME} ${isConnected && !kiosk ? "connected" : ""
182
- }`}
183
- style={{
184
-
185
- // background: state.theme.colors.bodyBackground,
186
-
187
- height: 10,
188
-
189
- }}
190
- >
191
- {/* <MenuOutlined style={{left:'1%',top:'1%', fontSize:18, position:'absolute', zIndex:999}} onClick={showSidebar}/> */}
192
-
193
- <div className="layout-content">
194
- <div
195
-
196
- //whileHover="hover"
197
- //whileTap="tap"
198
- className={`left-bar ${!isConnected && !isMobile ? "" : "hide"}${!collapsed ? "open" : "close"}${kiosk && !isConnected ? "kioskon" : ""}`}
199
- // style={{ background: state.theme.colors.leftSectionBackground }}
200
- >
201
-
202
- {!isMobile && !isConnected ? (
203
- <motion.div
204
- variants={boxVariants}
205
- initial={["entering"]}
206
- animate={boxControls}
207
- className={`sidebar-container ${!collapsed ? "open" : "close"}${kiosk ? "" : "kioskon"}`}
208
-
209
- >
210
-
211
- <SideMenu
212
- // isOpen={isOpen}
213
- collapsed={collapsed}
214
- setCollapsed={setCollapsed}
215
- loading={loading}
216
- appSettings={appSettings}
217
- callback={onClose}
218
- modules={modules}
219
- history={history}
220
- />
221
-
222
- </motion.div>
223
- ) : (
224
- <Drawer
225
- placement="left"
226
- onClose={onClose}
227
- visible={visible}
228
- className="side-drawer-content"
229
- >
230
- <div
231
- className={`sidebar-container ${!collapsed ? "open" : "close"}`}
157
+ <>
158
+ <div
159
+ className={`global-header ${process.env.REACT_APP_THEME} ${isConnected && !kiosk ? 'connected' : ''}`}
160
+ style={{
161
+ // background: state.theme.colors.bodyBackground,
162
+
163
+ height: 10,
164
+ }}
165
+ >
166
+ {/* <MenuOutlined style={{left:'1%',top:'1%', fontSize:18, position:'absolute', zIndex:999}} onClick={showSidebar}/> */}
167
+
168
+ <div className="layout-content">
169
+ <div
170
+ //whileHover="hover"
171
+ //whileTap="tap"
172
+ className={`left-bar ${!isConnected && !isMobile ? '' : 'hide'}${!collapsed ? 'open' : 'close'}${kiosk && !isConnected ? 'kioskon' : ''}`}
173
+ // style={{ background: state.theme.colors.leftSectionBackground }}
174
+ >
175
+ {!isMobile && !isConnected ? (
176
+ <motion.div
177
+ variants={boxVariants}
178
+ initial={['entering']}
179
+ animate={boxControls}
180
+ className={`sidebar-container ${!collapsed ? 'open' : 'close'}${kiosk ? '' : 'kioskon'}`}
232
181
  >
233
182
  <SideMenu
234
183
  // isOpen={isOpen}
@@ -240,168 +189,188 @@ export default function GlobalHeader({
240
189
  modules={modules}
241
190
  history={history}
242
191
  />
243
- </div>
244
- </Drawer>
245
- )}
246
- </div>
192
+ </motion.div>
193
+ ) : (
194
+ <Drawer placement="left" onClose={onClose} visible={visible} className="side-drawer-content">
195
+ <div className={`sidebar-container ${!collapsed ? 'open' : 'close'}`}>
196
+ <SideMenu
197
+ // isOpen={isOpen}
198
+ collapsed={collapsed}
199
+ setCollapsed={setCollapsed}
200
+ loading={loading}
201
+ appSettings={appSettings}
202
+ callback={onClose}
203
+ modules={modules}
204
+ history={history}
205
+ />
206
+ </div>
207
+ </Drawer>
208
+ )}
209
+ </div>
210
+
211
+ {/* Right Section of the Component Loader */}
212
+ <div
213
+ className={`right-section ${!collapsed ? 'open' : 'close'} ${kiosk ? 'kioskon' : ''}`}
214
+ style={{ background: state.theme.colors.bodyBackground }}
215
+ >
216
+ {/* For not connected section */}
217
+ {!isConnected && !kiosk ? (
218
+ <motion.div
219
+ variants={headerShellVariants}
220
+ {...motionProps}
221
+ className={`page-wrapper ${!collapsed ? 'open' : 'close'}`}
222
+ // style={{ background: state.theme.colors.headerBg }}
223
+ >
224
+ {/* */}
225
+ <motion.div className="page-header-name" variants={headerClusterVariants}>
226
+ <ProgressBar isLoading={loading} />
247
227
 
248
- {/* Right Section of the Component Loader */}
249
- <div className={`right-section ${!collapsed ? "open" : "close"} ${kiosk ? "kioskon" : ""}`} style={{ background: state.theme.colors.bodyBackground }}>
250
- {/* For not connected section */}
251
- {!isConnected && !kiosk ? (
252
-
253
- <div className={`page-wrapper ${!collapsed ? "open" : "close"}`}
254
- // style={{ background: state.theme.colors.headerBg }}
255
- >
256
- {/* */}
257
- <div className="page-header-name">
258
-
259
- <ProgressBar isLoading={loading} />
260
-
261
- <span type
262
- onClick={!isMobile ? toggleCollapsed : hideToggle}
263
- className="toggle-box toggle-menu"
264
- >
265
- <MenuOutlined />
266
-
267
- </span>
268
-
269
- {/* Back Button */}
270
- {location.pathname !== "/" ? (
271
- <span
272
- className="toggle-box"
273
- onClick={() => {
274
- history && history.goBack();
275
- }}
276
- >
277
- <GenericHeader />
228
+ <span type onClick={!isMobile ? toggleCollapsed : hideToggle} className="toggle-box toggle-menu">
229
+ <MenuOutlined />
278
230
  </span>
279
- ) : null}
280
- {/* Back Button Ends */}
281
-
282
-
283
- {location.pathname !== "/" ? (
284
- <h4 className="menu-caption header-caption" style={{ color: state.theme.colors.headerColor }}>
285
- {menu.caption}
286
- </h4>
287
- ) : null}
288
- </div>
289
-
290
- {/* Page Menu Actions */}
291
-
292
- {user.role || user.id ? (
293
- <div className="page-menu">
294
- {/* Search Input in header start */}
295
- { !isMobile && (
296
-
297
- <div>
298
- <Input
299
- placeholder="Search (Shift + F)"
300
- prefix={<SearchOutlined />}
301
- onClick={openSearchModal}
302
-
303
- readOnly
304
- style={{ width: 250 }}
305
- />
306
-
307
-
308
- <SpotlightSearch ref={(elem) => SettingsUtil.registerModal(elem)} props={props}/>
309
-
310
- </div>
311
- )}
312
- {/* Search Input in header start */}
313
231
 
314
- {/** branchswitcher Option */}
315
- {/* branch switcher controlled with env for matria and nura */}
316
- {!process.env.REACT_APP_SHOW_BRANCH_SWITCHER ? (
317
- <div className="branch-switcher">{globalCustomerHeader()}</div>
318
- ):null}
319
- {/* <div className="branch-switcher">{globalCustomerHeader()}</div> */}
320
-
321
-
322
- {/* Search Option */}
323
-
324
- {/* <ModalSearch /> */}
325
-
326
- {/* Search Option Ends */}
327
-
328
- {/* Configurator Actions */}
329
- {user.isAdmin ? (
330
- <>
331
- {/* Models */}
332
- {menu && menu.id ? (
333
- <Link to={`/menus/${menu.id}`}>
334
-
335
- <Button type="default" size={"small"} icon={<SettingOutlined />}>
336
-
337
- </Button>
338
- </Link>
339
- ) : null}
340
- {/* Models Ends */}
341
- </>
232
+ {/* Back Button */}
233
+ {location.pathname !== '/' ? (
234
+ <span
235
+ className="toggle-box"
236
+ onClick={() => {
237
+ history && history.goBack();
238
+ }}
239
+ >
240
+ <GenericHeader />
241
+ </span>
342
242
  ) : null}
343
- {/* Configurator Actions Ends */}
344
-
345
-
346
-
243
+ {/* Back Button Ends */}
347
244
 
245
+ {location.pathname !== '/' ? (
246
+ <h4 className="menu-caption header-caption" style={{ color: state.theme.colors.headerColor }}>
247
+ {menu.caption}
248
+ </h4>
249
+ ) : null}
250
+ </motion.div>
348
251
 
252
+ {/* Page Menu Actions */}
349
253
 
350
- {/* Reload Button */}
351
-
352
- <Button onClick={reload} icon={<ReloadOutlined />} type="default" size={"small"} >
353
-
354
- </Button>
355
-
356
- {/* Reload Button Ends */}
357
-
358
- {/** Switch Languages starts */}
359
- {process.env.REACT_APP_ENABLE_LANGUAGE_SWITCHER ? <LanguageSwitcher /> : null}
360
- {/** Switch Languages ends */}
254
+ {user.role || user.id ? (
255
+ <motion.div className="page-menu" variants={headerActionsVariants}>
256
+ {/* Search Input in header start */}
257
+ {!isMobile && (
258
+ <motion.div className="header-action header-action-search" variants={headerActionItemVariants}>
259
+ <Input
260
+ placeholder="Search (Shift + F)"
261
+ prefix={<SearchOutlined />}
262
+ onClick={openSearchModal}
263
+ readOnly
264
+ style={{ width: 250 }}
265
+ />
266
+
267
+ <SpotlightSearch ref={(elem) => SettingsUtil.registerModal(elem)} props={props} />
268
+ </motion.div>
269
+ )}
270
+ {/* Search Input in header start */}
361
271
 
362
- {/* User Profile */}
363
- <div style={{ padding: "10px" }}>
364
- <ProfileAvatar />
365
- <span style={{ color: state.theme.colors.colorText }}> {user.name} </span>
366
- </div>
367
- {/* User Profile Ends */}
368
- </div>
369
- ) : null}
272
+ {/** branchswitcher Option */}
273
+ {/* branch switcher controlled with env for matria and nura */}
274
+ {!process.env.REACT_APP_SHOW_BRANCH_SWITCHER ? (
275
+ <motion.div className="branch-switcher header-action" variants={headerActionItemVariants}>
276
+ {globalCustomerHeader()}
277
+ </motion.div>
278
+ ) : null}
279
+ {/* <div className="branch-switcher">{globalCustomerHeader()}</div> */}
280
+
281
+ {/* Search Option */}
282
+
283
+ {/* <ModalSearch /> */}
284
+
285
+ {/* Search Option Ends */}
286
+
287
+ {/* Configurator Actions */}
288
+ {user.isAdmin ? (
289
+ <>
290
+ {/* Models */}
291
+ {menu && menu.id ? (
292
+ <motion.div className="header-action" variants={headerActionItemVariants}>
293
+ <Link to={`/menus/${menu.id}`}>
294
+ <Button type="default" size={'small'} icon={<SettingOutlined />}></Button>
295
+ </Link>
296
+ </motion.div>
297
+ ) : null}
298
+ {/* Models Ends */}
299
+ </>
300
+ ) : null}
301
+ {/* Configurator Actions Ends */}
302
+
303
+ {/* Reload Button */}
304
+
305
+ <motion.div className="header-action" variants={headerActionItemVariants}>
306
+ <Button onClick={reload} icon={<ReloadOutlined />} type="default" size={'small'}></Button>
307
+ </motion.div>
308
+
309
+ {/* Reload Button Ends */}
310
+
311
+ {/** Switch Languages starts */}
312
+ {process.env.REACT_APP_ENABLE_LANGUAGE_SWITCHER ? (
313
+ <motion.div className="header-action" variants={headerActionItemVariants}>
314
+ <LanguageSwitcher />
315
+ </motion.div>
316
+ ) : null}
317
+ {/** Switch Languages ends */}
318
+
319
+ {/* User Profile */}
320
+ <motion.div className="header-profile-wrap header-action" variants={headerActionItemVariants}>
321
+ <ProfileAvatar />
322
+ <span className="header-profile-name" style={{ color: state.theme.colors.colorText }}>
323
+ {' '}
324
+ {user.name}{' '}
325
+ </span>
326
+ </motion.div>
327
+ {/* User Profile Ends */}
328
+ </motion.div>
329
+ ) : null}
370
330
 
371
- {/* Page Menu Actions Ends */}
372
- </div>
373
- ) : null}
331
+ {/* Page Menu Actions Ends */}
332
+ </motion.div>
333
+ ) : null}
374
334
 
375
- {/* The children is rendered */}
376
- {children}
377
- {/* The children is rendered */}
335
+ {/* The children is rendered */}
336
+ <motion.div className="page-content-stage" variants={contentRevealVariants} {...motionProps}>
337
+ {children}
338
+ </motion.div>
339
+ {/* The children is rendered */}
340
+ </div>
341
+ {/* Right Section of the Component Loader Ends */}
378
342
  </div>
379
- {/* Right Section of the Component Loader Ends */}
380
343
  </div>
381
- </div>
344
+ {licAlert && licenseData && (
345
+ <div
346
+ style={{
347
+ marginTop: '3rem',
348
+ right: '2%',
349
+ position: 'absolute',
350
+ zIndex: 999,
351
+ }}
352
+ >
353
+ <LicenseAlert data={licenseData} />
354
+ </div>
355
+ )}
356
+ </>
382
357
  );
383
358
  }
384
359
 
385
-
386
360
  /**
387
- *
388
- * @returns
361
+ *
362
+ * @returns
389
363
  */
390
364
  function ProfileAvatar() {
391
-
392
365
  const { user = { locations: [] } } = useContext(GlobalContext);
393
366
 
394
- useEffect(() => { }, []);
367
+ useEffect(() => {}, []);
395
368
 
396
369
  return (
397
370
  <Link className="profile-avatar" to="/profile">
398
371
  {user.photograph ? (
399
372
  <>
400
- <img
401
- className="profile-picture"
402
- src={user.photograph}
403
- alt={"user photograph"}
404
- />
373
+ <img className="profile-picture" src={user.photograph} alt={'user photograph'} />
405
374
  </>
406
375
  ) : (
407
376
  <Avatar shape="square" size="small" icon={<UserOutlined />} />
@@ -410,4 +379,4 @@ function ProfileAvatar() {
410
379
  {/* {user.name} */}
411
380
  </Link>
412
381
  );
413
- }
382
+ }