feat: show login modal when clicking notification without being logged in
This commit is contained in:
parent
977d6789da
commit
68f4b1e909
3 changed files with 7 additions and 3 deletions
|
|
@ -1,16 +1,18 @@
|
|||
import { usePrimaryPage } from '@/PageManager'
|
||||
import { useNostr } from '@/providers/NostrProvider'
|
||||
import { useNotification } from '@/providers/NotificationProvider'
|
||||
import { Bell } from 'lucide-react'
|
||||
import SidebarItem from './SidebarItem'
|
||||
|
||||
export default function NotificationsButton() {
|
||||
const { checkLogin } = useNostr()
|
||||
const { navigate, current } = usePrimaryPage()
|
||||
const { hasNewNotification } = useNotification()
|
||||
|
||||
return (
|
||||
<SidebarItem
|
||||
title="Notifications"
|
||||
onClick={() => navigate('notifications')}
|
||||
onClick={() => checkLogin(() => navigate('notifications'))}
|
||||
active={current === 'notifications'}
|
||||
>
|
||||
<div className="relative">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue