@@ -2,6 +2,8 @@ import Link from 'next/link';
22import { useParams , usePathname } from 'next/navigation' ;
33import { v4 as uuidv4 } from 'uuid' ;
44import { useTranslations } from 'next-intl' ;
5+ import { LuUsers , LuCalendar , LuMic } from 'react-icons/lu' ;
6+ import { getIcon } from '@/lib/icons' ;
57
68const Navbar = ( { isMobile } ) => {
79 const pathname = usePathname ( ) ;
@@ -26,7 +28,7 @@ const Navbar = ({ isMobile }) => {
2628 aria-label = "Main navigation"
2729 className = {
2830 isMobile
29- ? 'flex flex-col space-y-2 '
31+ ? 'flex flex-col space-y-2'
3032 : 'hidden lg:flex space-x-3 items-center'
3133 }
3234 >
@@ -36,25 +38,35 @@ const Navbar = ({ isMobile }) => {
3638 ( normalizedPathname === '/' && link . href === '/' ) ||
3739 ( link . href !== '/' && normalizedPathname . startsWith ( link . href ) ) ;
3840
41+ const IconComponent = getIcon ( link . icon ) ;
42+
3943 return (
4044 < Link
4145 key = { link . uuid }
4246 href = { link . newWindow ? link . href : `/${ lang } ${ link . href } ` }
4347 target = { link . newWindow ? '_blank' : '_self' }
4448 rel = { link . newWindow ? 'noopener noreferrer' : undefined }
4549 className = { `
46- text-gray-800
47- px-4
48- py-2
49- text-md
50- hover:text-black
51- hover:bg-gray-200
52- ${ ! isMobile && 'rounded-full' }
53- ${ isActive ? 'bg-gray-200 text-gray-800' : '' }
54- ` }
50+ flex items-center gap-1
51+ text-gray-900
52+ px-4
53+ py-2
54+ text-md
55+ hover:text-gray-900
56+ hover:bg-gray-200
57+ hover:ring-1
58+ hover:ring-gray-600
59+ transition-all
60+ hover:shadow-sm
61+ duration-200
62+ ease-in
63+ ${ ! isMobile && 'rounded-full' }
64+ ${ isActive ? 'bg-gray-200 text-gray-900 sm:ring-gray-600 sm:ring-1' : '' }
65+ ` }
5566 aria-current = { isActive ? 'page' : undefined }
5667 >
57- { link . label }
68+ { IconComponent && < IconComponent size = { 20 } strokeWidth = { 2 } /> }
69+ < span > { link . label } </ span >
5870 </ Link >
5971 ) ;
6072 } ) }
0 commit comments