Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4436 Rev 4444
Línea 11... Línea 11...
11
import ChatIcon from '@mui/icons-material/Chat'
11
import ChatIcon from '@mui/icons-material/Chat'
12
import NotificationsIcon from '@mui/icons-material/Notifications'
12
import NotificationsIcon from '@mui/icons-material/Notifications'
13
import UserOptions from './UserOptions'
13
import UserOptions from './UserOptions'
Línea 14... Línea 14...
14
 
14
 
-
 
15
import './Header.scss'
Línea 15... Línea 16...
15
import './Header.scss'
16
import { useForm } from 'react-hook-form';
16
 
17
 
17
const ICON_OPTIONS = [
18
const ICON_OPTIONS = [
18
  HomeIcon,
19
  HomeIcon,
Línea 28... Línea 29...
28
  image = '',
29
  image = '',
29
  logoForNavbar = '',
30
  logoForNavbar = '',
30
  fullName,
31
  fullName,
31
  linkAdmin,
32
  linkAdmin,
32
  linkImpersonate,
33
  linkImpersonate,
33
  companyVars,
34
  //companyVars,
34
  isChatPage,
35
  //isChatPage,
35
  routeCheckSession,
36
  //routeCheckSession,
36
}) => {
37
}) => {
Línea 37... Línea -...
37
 
-
 
38
  const [navbarOpen, setNavbarOpen] = useState(false);
38
 
39
  const [userImage, setUserImage] = useState(image)
39
  const [userImage, setUserImage] = useState(image)
40
  const [showMobileSearch, setShowMobileSearch] = useState(false)
40
  const [showMobileSearch, setShowMobileSearch] = useState(false)
41
  const [loading, setLoading] = useState(false);
41
  const [loading, setLoading] = useState(false);
Línea -... Línea 42...
-
 
42
  const searchInput = useRef(null);
-
 
43
 
-
 
44
  const { handleSubmit, register } = useForm()
42
  const searchInput = useRef(null);
45
  const handleOnSubmit = (data) => window.location.replace(`/search/entity/user?keyword=${data.keyword}`)
43
 
46
 
44
  useEffect(() => {
47
  useEffect(() => {
45
    let timer;
48
    let timer;
46
    if (!loading) {
49
    if (!loading) {
Línea 86... Línea 89...
86
      <div className='container'>
89
      <div className='container'>
87
        <div className='header__nav'>
90
        <div className='header__nav'>
Línea 88... Línea 91...
88
 
91
 
89
          <div className='header__left'>
92
          <div className='header__left'>
90
            <img src={logoForNavbar} alt='Logo' />
93
            <img src={logoForNavbar} alt='Logo' />
91
            <div
94
            <form
92
              className={`header__search ${showMobileSearch && 'show'}`}
95
              className={`header__search ${showMobileSearch && 'show'}`}
-
 
96
              onClick={handleDisplayMobileSearch}
93
              onClick={handleDisplayMobileSearch}
97
              onSubmit={handleSubmit(handleOnSubmit)}
94
            >
98
            >
95
              <SearchIcon />
99
              <SearchIcon />
96
              <input
100
              <input
97
                type='text'
101
                type='text'
98
                placeholder='Search'
102
                placeholder='Search'
-
 
103
                ref={searchInput}
99
                ref={searchInput}
104
                {...register('keyword')}
100
              />
105
              />
101
            </div>
106
            </form>
Línea 102... Línea 107...
102
          </div>
107
          </div>
103
 
108
 
104
          <nav className={`header__right ${showMobileSearch && 'd-none'}`}>
109
          <nav className={`header__right ${showMobileSearch && 'd-none'}`}>