feat(dashboard): route conversations and media

This commit is contained in:
jjbrunton committed 2026-08-08 15:06:19 +01:00
1 parent 768470204b
commit 20fa83f245
2 files changed
+27 -2

No files matched your search

@@ -0,0 +1,22 @@
import { useNavigate, useParams } from 'react-router-dom';
import { ConversationsPage } from './conversations-page.js';
export function ConversationRoute() {
const navigate = useNavigate();
const { conversationId } = useParams<{ conversationId: string }>();
function selectConversation(nextConversationId: string | null) {
void navigate(
nextConversationId
? `/conversations/${encodeURIComponent(nextConversationId)}`
: '/conversations',
);
}
return (
<ConversationsPage
selectedConversationId={conversationId ?? null}
onSelectedConversationChange={selectConversation}
/>
);
}