+ {headerPrefix}
diff --git a/src/components/GroupListViewer.tsx b/src/components/GroupListViewer.tsx
index 78fcdae..79b52df 100644
--- a/src/components/GroupListViewer.tsx
+++ b/src/components/GroupListViewer.tsx
@@ -123,9 +123,11 @@ const MemoizedChatViewer = memo(
function MemoizedChatViewer({
groupId,
relayUrl,
+ headerPrefix,
}: {
groupId: string;
relayUrl: string;
+ headerPrefix?: React.ReactNode;
}) {
return (
);
},
// Custom comparison: only re-render if group actually changed
+ // Note: headerPrefix is intentionally excluded - it's expected to be stable or change with isMobile
(prev, next) =>
prev.groupId === next.groupId && prev.relayUrl === next.relayUrl,
);
@@ -469,11 +473,25 @@ export function GroupListViewer({ identifier }: GroupListViewerProps) {
);
+ // Sidebar toggle button for mobile - passed to ChatViewer's headerPrefix
+ const sidebarToggle = isMobile ? (
+
+ ) : null;
+
// Chat view content
const chatContent = selectedGroup ? (
) : (
@@ -496,37 +514,6 @@ export function GroupListViewer({ identifier }: GroupListViewerProps) {
if (isMobile) {
return (
- {/* Mobile header with sidebar toggle */}
-
-
- {selectedGroup && (
-
- {groupsWithRecency.find(
- (g) =>
- g.groupId === selectedGroup.groupId &&
- g.relayUrl === selectedGroup.relayUrl,
- )?.metadata
- ? getTagValue(
- groupsWithRecency.find(
- (g) =>
- g.groupId === selectedGroup.groupId &&
- g.relayUrl === selectedGroup.relayUrl,
- )!.metadata!,
- "name",
- ) || selectedGroup.groupId
- : selectedGroup.groupId}
-
- )}
-
-
{/* Mobile sheet sidebar */}
@@ -537,7 +524,7 @@ export function GroupListViewer({ identifier }: GroupListViewerProps) {
- {/* Chat content */}
+ {/* Chat content - takes full height, sidebar toggle is in ChatViewer header */}
{chatContent}
);