diff --git a/src/components/NotificationList/NotificationItem/MentionNotification.tsx b/src/components/NotificationList/NotificationItem/MentionNotification.tsx index d76aef2..f6c6972 100644 --- a/src/components/NotificationList/NotificationItem/MentionNotification.tsx +++ b/src/components/NotificationList/NotificationItem/MentionNotification.tsx @@ -1,14 +1,13 @@ -import { getEmbeddedPubkeys } from '@/lib/event' +import ParentNotePreview from '@/components/ParentNotePreview' +import { getEmbeddedPubkeys, getParentBech32Id } from '@/lib/event' import { toNote } from '@/lib/link' -import { cn } from '@/lib/utils' import { useSecondaryPage } from '@/PageManager' import { useNostr } from '@/providers/NostrProvider' -import { AtSign, MessageCircle } from 'lucide-react' +import { AtSign, MessageCircle, Quote } from 'lucide-react' import { Event } from 'nostr-tools' import { useMemo } from 'react' -import ContentPreview from '../../ContentPreview' -import { FormattedTimestamp } from '../../FormattedTimestamp' -import UserAvatar from '../../UserAvatar' +import { useTranslation } from 'react-i18next' +import Notification from './Notification' export function MentionNotification({ notification, @@ -17,6 +16,7 @@ export function MentionNotification({ notification: Event isNew?: boolean }) { + const { t } = useTranslation() const { push } = useSecondaryPage() const { pubkey } = useNostr() const isMention = useMemo(() => { @@ -24,25 +24,40 @@ export function MentionNotification({ const mentions = getEmbeddedPubkeys(notification) return mentions.includes(pubkey) }, [pubkey, notification]) + const parentEventId = useMemo(() => getParentBech32Id(notification), [notification]) return ( -
+ ) + } + sender={notification.pubkey} + sentAt={notification.created_at} + targetEvent={notification} + middle={ + parentEventId && ( +