Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4734 | Rev 4743 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4734 Rev 4736
Línea 13... Línea 13...
13
 
13
 
14
import './Header.scss'
14
import './Header.scss'
15
import { useForm } from 'react-hook-form';
15
import { useForm } from 'react-hook-form';
16
import NotificationsOption from './NotificationsOption';
16
import NotificationsOption from './NotificationsOption';
-
 
17
import ComunicationOptions from './ComunicationOptions';
Línea 17... Línea 18...
17
import ComunicationOptions from './ComunicationOptions';
18
import MobileMenu from './MobileMenu';
18
 
19
 
19
const ICON_OPTIONS = [
20
const ICON_OPTIONS = [
20
  HomeIcon,
21
  HomeIcon,
Línea 90... Línea 91...
90
      document.removeEventListener("mousedown", handleClickOutside);
91
      document.removeEventListener("mousedown", handleClickOutside);
91
    };
92
    };
92
  }, [searchInput]);
93
  }, [searchInput]);
Línea 93... Línea 94...
93
 
94
 
-
 
95
  return (
94
  return (
96
    <>
95
    <div className='header'>
97
      <div className='header'>
96
      <div className='container'>
98
        <div className='container'>
97
        <div className='header__nav'>
99
          <div className='header__nav'>
98
 
100
 
99
          <div className='header__left'>
101
            <div className='header__left'>
100
            <img src={logoForNavbar} alt='Logo' className='d-none d-md-block' />
102
              <img src={logoForNavbar} alt='Logo' className='d-none d-md-block' />
101
            <form
103
              <form
102
              className={`header__search ${showMobileSearch && 'show'}`}
104
                className={`header__search ${showMobileSearch && 'show'}`}
103
              onClick={handleDisplayMobileSearch}
105
                onClick={handleDisplayMobileSearch}
104
              onSubmit={handleSubmit(handleOnSubmit)}
106
                onSubmit={handleSubmit(handleOnSubmit)}
105
              ref={searchInput}
107
                ref={searchInput}
106
            >
108
              >
107
              <SearchIcon />
109
                <SearchIcon />
108
              <input
110
                <input
109
                type='text'
111
                  type='text'
110
                placeholder='Search'
112
                  placeholder='Search'
111
                name='keyword'
113
                  name='keyword'
112
                ref={register}
114
                  ref={register}
113
              />
115
                />
-
 
116
              </form>
-
 
117
            </div>
-
 
118
 
-
 
119
            <nav className={`header__right ${showMobileSearch && 'd-none'}`}>
-
 
120
              <ul>
-
 
121
                {menuItems.map((item, index) => {
-
 
122
                  return (
-
 
123
                    <HeaderOptions
-
 
124
                      key={index}
-
 
125
                      Icon={ICON_OPTIONS[index]}
-
 
126
                      title={item.label}
-
 
127
                      url={item.href}
-
 
128
                      childs={item.childs}
-
 
129
                    />
-
 
130
                  )
-
 
131
                })}
-
 
132
                <NotificationsOption
-
 
133
                  Icon={NotificationsIcon}
-
 
134
                  title='Notificaciones'
-
 
135
                  url='/notifications'
-
 
136
                  sessionLink={routeCheckSession}
-
 
137
                />
-
 
138
                <ComunicationOptions
-
 
139
                  sessionLink={routeCheckSession}
-
 
140
                  Icon={ChatIcon}
-
 
141
                  title='Comunicación'
-
 
142
                  url=''
-
 
143
                  childs={[
-
 
144
                    ...aditionalItems,
-
 
145
                    { label: 'Inmail', href: '/inmail' },
-
 
146
                    { label: 'Chat', href: '/chat' }
-
 
147
                  ]}
-
 
148
                />
-
 
149
                <UserOptions
-
 
150
                  image={userImage}
-
 
151
                  name={fullName}
-
 
152
                  adminUrl={linkAdmin}
-
 
153
                  impersonateUrl={linkImpersonate}
-
 
154
                />
-
 
155
              </ul>
114
            </form>
156
            </nav>
115
          </div>
-
 
116
 
-
 
117
          <nav className={`header__right ${showMobileSearch && 'd-none'}`}>
-
 
118
            <ul>
-
 
119
              {menuItems.map((item, index) => {
-
 
120
                return (
-
 
121
                  <HeaderOptions
-
 
122
                    key={index}
-
 
123
                    Icon={ICON_OPTIONS[index]}
-
 
124
                    title={item.label}
-
 
125
                    url={item.href}
-
 
126
                    childs={item.childs}
-
 
127
                  />
-
 
128
                )
-
 
129
              })}
-
 
130
              <NotificationsOption
-
 
131
                Icon={NotificationsIcon}
-
 
132
                title='Notificaciones'
-
 
133
                url='/notifications'
-
 
134
                sessionLink={routeCheckSession}
-
 
135
              />
-
 
136
              <ComunicationOptions
-
 
137
                sessionLink={routeCheckSession}
-
 
138
                Icon={ChatIcon}
-
 
139
                title='Comunicación'
-
 
140
                url=''
-
 
141
                childs={[
-
 
142
                  ...aditionalItems,
-
 
143
                  { label: 'Inmail', href: '/inmail' },
-
 
144
                  { label: 'Chat', href: '/chat' }
-
 
145
                ]}
-
 
146
              />
-
 
147
              <UserOptions
-
 
148
                image={userImage}
-
 
149
                name={fullName}
-
 
150
                adminUrl={linkAdmin}
-
 
151
                impersonateUrl={linkImpersonate}
-
 
152
              />
-
 
153
            </ul>
-
 
154
          </nav>
157
          </div>
155
        </div>
158
        </div>
-
 
159
      </div>
156
      </div>
160
      <MobileMenu navLinks={menuItems} icons={ICON_OPTIONS} />
157
    </div>
161
    </>
158
  )
162
  )
Línea 159... Línea 163...
159
}
163
}