postiz-app/apps/frontend/src/components/notifications/notification.component.tsx
2024-02-29 01:09:55 +07:00

20 lines
No EOL
683 B
TypeScript

"use client";
import {NotificationBell, NovuProvider, PopoverNotificationCenter} from "@novu/notification-center";
import {useUser} from "@gitroom/frontend/components/layout/user.context";
const NotificationComponent = () => {
const user = useUser();
return (
<NovuProvider
subscriberId={user?.id}
applicationIdentifier={process.env.NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER!}
>
<PopoverNotificationCenter colorScheme="dark">
{({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
</PopoverNotificationCenter>
</NovuProvider>
)
}
export default NotificationComponent;