File tree Expand file tree Collapse file tree 1 file changed +31
-10
lines changed
apps/app/src/components/notifications Expand file tree Collapse file tree 1 file changed +31
-10
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { usePathname } from 'next/navigation';
44import { env } from '@/env.mjs' ;
55import { Inbox } from '@novu/nextjs' ;
66import { useSession } from '@/utils/auth-client' ;
7+ import { Bell , Settings } from 'lucide-react' ;
78
89export function NotificationBell ( ) {
910 const applicationIdentifier = env . NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER ;
@@ -17,20 +18,40 @@ export function NotificationBell() {
1718 return null ;
1819 }
1920
21+ const appearance = {
22+ icons : {
23+ bell : ( ) => < Bell size = { 20 } /> ,
24+ cogs : ( ) => < Settings size = { 20 } /> ,
25+ } ,
26+ elements : {
27+ popoverContent : {
28+ right : '8px' ,
29+ left : 'auto !important' ,
30+ marginTop : '8px' ,
31+ width : '360px' ,
32+ } ,
33+ notificationDot : {
34+ backgroundColor : 'hsl(var(--primary))' ,
35+ } ,
36+ notificationBar : ( { notification } : { notification : any } ) => {
37+ return notification . isRead ? 'bg-transparent' : 'bg-primary' ;
38+ }
39+ }
40+ } ;
41+
2042 return (
2143 < Inbox
2244 applicationIdentifier = { applicationIdentifier }
2345 subscriber = { `${ sessionData . userId } -${ orgId } ` }
24- appearance = { {
25- elements : {
26- popoverContent : {
27- right : '8px' ,
28- left : 'auto !important' ,
29- marginTop : '8px' ,
30- width : '360px' ,
31- } ,
32- } ,
33- } }
46+ appearance = { appearance }
47+ renderSubject = { ( notification ) => < strong > { notification . subject } </ strong > }
48+ renderBody = { ( notification ) => (
49+ < div className = "mt-1" >
50+ < p className = "text-xs text-muted-foreground" >
51+ { notification . body }
52+ </ p >
53+ </ div >
54+ ) }
3455 />
3556 ) ;
3657}
You can’t perform that action at this time.
0 commit comments