Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6710 | Rev 6753 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
6694 stevensc 1
import React, { useState } from 'react'
6632 stevensc 2
 
6704 stevensc 3
import LinkItem from './link-item/LinkItem'
6635 stevensc 4
import SearchInput from './searchbox/SearchInput'
6704 stevensc 5
import ResponsiveNavbar from './responsive-navbar/ResponsiveNavbar'
6632 stevensc 6
import UserImageDropdown from './user-dropdown/UserImageDropdown'
7
 
6711 stevensc 8
import './styles/main.scss'
6632 stevensc 9
 
6704 stevensc 10
const Header = ({
11
  logo,
12
  menu,
13
  image,
14
  name,
15
  country,
16
  description,
17
  visits,
18
  connections,
19
  linkAdmin,
20
  linkImpersonate,
21
}) => {
22
  const [isShow, setIsShow] = useState(false)
6632 stevensc 23
 
6704 stevensc 24
  const toggleMenu = () => {
25
    setIsShow((prevIsShow) => !prevIsShow)
26
  }
27
 
6632 stevensc 28
  return (
29
    <>
6709 stevensc 30
      <header className="header">
6632 stevensc 31
        <a href="/" className="logo d-none d-xl-block">
6694 stevensc 32
          <img src={logo} alt="logo" />
6632 stevensc 33
        </a>
34
        <SearchInput />
35
        <div className="hamburgerIcon">
6704 stevensc 36
          <i className="fa fa-bars text-gray" onClick={toggleMenu} />
6632 stevensc 37
        </div>
6700 stevensc 38
        <nav className="header-navigation">
6694 stevensc 39
          <ul>
6695 stevensc 40
            {menu?.map((item, index) => (
41
              <li key={index}>
42
                <LinkItem {...item} />
43
              </li>
6694 stevensc 44
            ))}
45
          </ul>
6632 stevensc 46
        </nav>
47
        <UserImageDropdown
6694 stevensc 48
          image={image}
49
          fullName={name}
50
          linkAdmin={linkAdmin}
51
          linkImpersonate={linkImpersonate}
6632 stevensc 52
        />
6707 stevensc 53
      </header>
6704 stevensc 54
      <ResponsiveNavbar
55
        show={isShow}
6706 stevensc 56
        toggleMenu={toggleMenu}
6704 stevensc 57
        name={name}
58
        image={image}
59
        visits={visits}
60
        country={country}
61
        description={description}
62
        connections={connections}
63
        linkAdmin={linkAdmin}
64
        linkImpersonate={linkImpersonate}
65
      />
6632 stevensc 66
    </>
67
  )
68
}
69
 
70
export default Header