Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6706 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import React, { useRef } from 'react'
import useOutsideClick from '../../../../hooks/useOutsideClick'
import SuggestWidget from '../../../widgets/default/SuggestWidget'
import ProfileInfo from '../../../widgets/default/ProfileWidget'

const ResponsiveNavbar = ({
  show,
  image,
  toggleMenu,
  name,
  description,
  visits,
  country,
  connections,
  linkAdmin,
  linkImpersonate,
}) => {
  const responsiveNavbar = useRef()
  useOutsideClick(responsiveNavbar, () => toggleMenu())

  return (
    <nav
      className={`responsiveNavbar ${show ? 'slideIn' : 'slideOut'} p-0`}
      ref={responsiveNavbar}
    >
      <ProfileInfo
        connections={connections}
        country={country}
        description={description}
        visits={visits}
        image={image}
        linkAdmin={linkAdmin}
        linkImpersonate={linkImpersonate}
        name={name}
      />
      <SuggestWidget title="Mis Grupos:" url="/helpers/my-groups" />
      <SuggestWidget title="Grupos:" url="/helpers/groups-suggestion" />
    </nav>
  )
}

export default ResponsiveNavbar