You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
905 B
27 lines
905 B
import { usePrimaryPage } from '@/contexts/primary-page-context' |
|
import { usePrimaryNoteView } from '@/contexts/primary-note-view-context' |
|
import { useNostr } from '@/providers/NostrProvider' |
|
import { Bell } from 'lucide-react' |
|
import SidebarItem from './SidebarItem' |
|
|
|
export default function NotificationButton() { |
|
const { navigate, current, currentPageProps, display } = usePrimaryPage() |
|
const { primaryViewType } = usePrimaryNoteView() |
|
const { checkLogin } = useNostr() |
|
const spell = (currentPageProps as { spell?: string } | undefined)?.spell |
|
|
|
return ( |
|
<SidebarItem |
|
title="Notifications" |
|
onClick={() => checkLogin(() => navigate('spells', { spell: 'notifications' }))} |
|
active={ |
|
display && |
|
current === 'spells' && |
|
primaryViewType === null && |
|
spell === 'notifications' |
|
} |
|
> |
|
<Bell strokeWidth={3} /> |
|
</SidebarItem> |
|
) |
|
}
|
|
|