import InboxContent from '@/components/Inbox/InboxContent' import PrimaryPageLayout from '@/layouts/PrimaryPageLayout' import { useDM } from '@/providers/DMProvider' import { useNostr } from '@/providers/NostrProvider' import { TPageRef } from '@/types' import { MessageSquare, LogIn } from 'lucide-react' import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react' import { useTranslation } from 'react-i18next' import { usePrimaryPage } from '@/PageManager' import { Button } from '@/components/ui/button' const InboxPage = forwardRef((_, ref) => { const { t } = useTranslation() const layoutRef = useRef(null) const { pubkey } = useNostr() const { navigate } = usePrimaryPage() const { markInboxAsSeen } = useDM() useImperativeHandle(ref, () => layoutRef.current as TPageRef) // Mark inbox as seen when page is viewed useEffect(() => { if (pubkey) { markInboxAsSeen() } }, [pubkey, markInboxAsSeen]) return ( } displayScrollToTopButton > {pubkey ? ( ) : (

{t('Sign in to view your messages')}

{t('Your encrypted conversations will appear here')}

)}
) }) InboxPage.displayName = 'InboxPage' export default InboxPage function InboxTitlebar() { const { t } = useTranslation() return (
{t('Inbox')}
) }