diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index be6814f..48c9e4f 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -71,7 +71,7 @@ function Shell() { )} {screen === 'feed' && } {screen === 'profiles' && setCreateOpen(true)} />} - {screen === 'compose' && } + {screen === 'compose' && } {screen === 'relays' && } {screen === 'signer' && } {screen === 'settings' && } diff --git a/frontend/src/screens/ComposeScreen.tsx b/frontend/src/screens/ComposeScreen.tsx index 26fc6e2..092ba17 100644 --- a/frontend/src/screens/ComposeScreen.tsx +++ b/frontend/src/screens/ComposeScreen.tsx @@ -9,6 +9,7 @@ import { Modal } from '../components/Modal'; import { shortenNpub } from '../lib/format'; import { extractImageUrls, extractLinkUrls } from '../lib/media'; import type { LinkPreview } from '../lib/types'; +import type { Screen } from '../lib/navigation'; import { useApp } from '../state/AppProvider'; const SOFT_LIMIT = 10_000; @@ -32,7 +33,11 @@ function buildContent(content: string, attachments: Attachment[]): string { return parts.join('\n'); } -export function ComposeScreen() { +interface ComposeScreenProps { + onNavigate?: (screen: Screen) => void; +} + +export function ComposeScreen({ onNavigate }: ComposeScreenProps) { const { state, publishNote, @@ -364,6 +369,12 @@ export function ComposeScreen() { {shortenNpub(lastReport.event_id, true)} + {onNavigate && ( + + )} {lastReport.failed.length > 0 && (
Relays that didn't accept it diff --git a/frontend/src/screens/HomeScreen.tsx b/frontend/src/screens/HomeScreen.tsx index aca5cad..9113816 100644 --- a/frontend/src/screens/HomeScreen.tsx +++ b/frontend/src/screens/HomeScreen.tsx @@ -184,6 +184,7 @@ export function HomeScreen({ onNavigate, onCreateProfile }: HomeScreenProps) { onNavigate('compose')} + onNavigateFeed={() => onNavigate('feed')} /> @@ -195,9 +196,11 @@ export function HomeScreen({ onNavigate, onCreateProfile }: HomeScreenProps) { function PublicationResult({ lastPublish, onNavigateCompose, + onNavigateFeed, }: { lastPublish: ReturnType['lastPublish']; onNavigateCompose: () => void; + onNavigateFeed: () => void; }) { if (!lastPublish) { return ( @@ -236,6 +239,10 @@ function PublicationResult({ {shortenNpub(report.event_id, true)} + ); } @@ -250,6 +257,10 @@ function PublicationResult({ +
Relay results