import classNames from 'classnames'; import React from 'react'; import { NavLink } from 'react-router-dom'; import { Icon, Text } from './ui'; interface ISidebarNavigationLink { count?: number, icon: string, text: string | React.ReactElement, to: string, } const SidebarNavigationLink = ({ icon, text, to, count }: ISidebarNavigationLink) => { const isActive = location.pathname === to; const withCounter = typeof count !== 'undefined'; return ( {withCounter && count > 0 ? ( {count} ) : null} {text} ); }; export default SidebarNavigationLink;