import { faChevronDown as arrowIcon, faCogs as cogsIcon } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { useToggle } from '@shlinkio/shlink-frontend-kit'; import classNames from 'classnames'; import type { FC } from 'react'; import { useEffect } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap'; import { ShlinkLogo } from './img/ShlinkLogo'; import './MainHeader.scss'; export const MainHeader = (ServersDropdown: FC) => () => { const [isOpen, toggleOpen, , close] = useToggle(); const location = useLocation(); const { pathname } = location; useEffect(close, [location]); const settingsPath = '/settings'; const toggleClass = classNames('main-header__toggle-icon', { 'main-header__toggle-icon--opened': isOpen }); return ( Shlink ); };