Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3694 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3201 stevensc 1
import React from 'react'
2
import {
3
  BusinessCenter,
4
  Chat,
5
  Groups,
6
  Home,
7
  People,
8
  School,
9
  Sell
10
} from '@mui/icons-material'
11
 
12
import HeaderOptions from './navigation-item'
13
import UserOptions from './user-options'
14
 
15
const ICON_OPTIONS = [Home, People, BusinessCenter, Groups, Sell, Chat, School]
16
 
17
const HeaderNavigation = ({
18
  routes = [],
19
  image = '',
20
  fullName,
21
  linkAdmin,
22
  linkImpersonate,
23
  linkKnowledgeArea,
24
  routeKnowledgeArea,
25
  urlImpersonate,
26
  urlAdmin,
27
  defaultNetwork,
28
  notificationsCount,
29
  messagesCount
30
}) => {
31
  return (
32
    <nav className='header__right'>
33
      <ul>
34
        {routes.map((item, index) => {
35
          return (
36
            <HeaderOptions
37
              key={index}
38
              Icon={ICON_OPTIONS[index]}
39
              title={item.label}
40
              url={item.href}
41
              childs={item.childs}
42
              ajaxRequest={item.ajax}
43
              isMobile={['Conocimiento', 'Comunicación'].includes(item.label)}
44
              count={
45
                !routes[index + 1] && (notificationsCount || messagesCount)
46
              }
47
            />
48
          )
49
        })}
50
        <UserOptions
51
          image={image}
52
          name={fullName}
53
          adminUrl={linkAdmin}
54
          impersonateUrl={linkImpersonate}
55
          defaultNetwork={defaultNetwork}
56
          knowledgeAuth={linkKnowledgeArea}
57
          routeKnowledge={routeKnowledgeArea}
58
          routeAdmin={urlAdmin}
59
          routeImpersonate={urlImpersonate}
60
        />
61
      </ul>
62
    </nav>
63
  )
64
}
65
 
66
export default HeaderNavigation