@@ -3,16 +3,17 @@ import useLoginModal from '@/hooks/useLoginModal';
3
3
import { useRouter } from 'next/router' ;
4
4
import React , { useCallback } from 'react' ;
5
5
import { IconType } from 'react-icons' ;
6
-
6
+ import { BsDot } from 'react-icons/bs' ;
7
7
interface SidebarItemProps {
8
8
label : string ;
9
9
href ?: string ;
10
10
icon : IconType ;
11
11
onClick ?: ( ) => void ;
12
12
auth ?: boolean ;
13
+ alert ?: boolean ;
13
14
}
14
15
15
- function SidebarItem ( { label, href, icon : Icon , onClick, auth } : SidebarItemProps ) {
16
+ function SidebarItem ( { label, href, icon : Icon , onClick, auth, alert } : SidebarItemProps ) {
16
17
const { data : currentUser } = useCurrentUser ( ) ;
17
18
const loginModal = useLoginModal ( ) ;
18
19
const router = useRouter ( ) ;
@@ -25,14 +26,19 @@ function SidebarItem({ label, href, icon: Icon, onClick, auth }: SidebarItemProp
25
26
router . push ( href ) ;
26
27
}
27
28
} , [ auth , currentUser , href , loginModal , onClick , router ] ) ;
29
+
28
30
return (
29
31
< div onClick = { handleClick } className = 'flex flex-row items-center' >
30
32
< div className = 'relative rounded-full h-14 w-14 flex items-center justify-center p-4 hover:bg-slate-300 hover:bg-opacity-10 cursor-pointer lg:hidden' >
31
33
< Icon size = { 28 } color = 'white' />
34
+ { alert ? < BsDot size = { 70 } className = 'text-sky-500 absolute -top-4 left-0' /> : null }
35
+
36
+ < p className = 'hidden lg:block text-white text-xl' > { label } </ p >
32
37
</ div >
33
38
< div className = 'relative hidden lg:flex gap-4 p-4 rounded-full items-center hover:bg-slate-300 hover:bg-opacity-10 cursor-pointer' >
34
39
< Icon size = { 24 } color = 'white' />
35
40
< p className = 'hidden lg:block text-white text-xl' > { label } </ p >
41
+ { alert ? < BsDot size = { 70 } className = 'text-sky-500 absolute -top-4 left-0' /> : null }
36
42
</ div >
37
43
</ div >
38
44
) ;
1 commit comments
vercel[bot] commentedon Apr 21, 2023
Successfully deployed to the following URLs:
project-1 – ./
project-1-git-main-alejandrosanchez90-s-team.vercel.app
project-1-eta-wine.vercel.app
project-1-alejandrosanchez90-s-team.vercel.app