diff --git a/packages/web/src/components/chat/FriendsPage.tsx b/packages/web/src/components/chat/FriendsPage.tsx index 00567a09..735859d8 100644 --- a/packages/web/src/components/chat/FriendsPage.tsx +++ b/packages/web/src/components/chat/FriendsPage.tsx @@ -13,7 +13,11 @@ import { api } from '../../api/client'; type Tab = 'online' | 'all' | 'pending' | 'add'; -export function FriendsPage() { +interface FriendsPageProps { + mobile?: boolean; +} + +export function FriendsPage({ mobile }: FriendsPageProps) { const [activeTab, setActiveTab] = useState('online'); const [addUsername, setAddUsername] = useState(''); const [addStatus, setAddStatus] = useState<{ type: 'success' | 'error', message: string } | null>(null); @@ -168,44 +172,78 @@ export function FriendsPage() { } }; + const popMobileScreen = useUIStore((s) => s.popMobileScreen); + return (
{/* Header */} -
-
- - - - Friends -
- -
- -
- setActiveTab('online')}>Online - setActiveTab('all')}>All - setActiveTab('pending')}> - Pending - {(pendingIncoming.length > 0) && ( - - {pendingIncoming.length} - - )} - - + Friends
+ ) : ( +
+
+ + + + Friends +
+
+
+ setActiveTab('online')}>Online + setActiveTab('all')}>All + setActiveTab('pending')}> + Pending + {(pendingIncoming.length > 0) && ( + + {pendingIncoming.length} + + )} + + +
+
+ +
+
+ )} -
- + {/* Mobile tab bar */} + {mobile && ( +
+ {(['online', 'all', 'pending', 'add'] as Tab[]).map((tab) => ( + + ))}
-
+ )} {renderTabContent()}
@@ -262,10 +300,10 @@ function AddFriendTab({

Add Friend

You can add friends with their Backspace username.

-
+ setAddUsername(e.target.value)} className="input-search w-full px-4 py-3 rounded-lg" @@ -273,7 +311,7 @@ function AddFriendTab({ diff --git a/packages/web/src/components/layout/MobileShell.tsx b/packages/web/src/components/layout/MobileShell.tsx index ea7c945b..26b002d4 100644 --- a/packages/web/src/components/layout/MobileShell.tsx +++ b/packages/web/src/components/layout/MobileShell.tsx @@ -15,6 +15,7 @@ const PlaceholderScreen = ({ label }: { label: string }) => ( ); import { MobileSpacesScreen } from './MobileSpacesScreen'; +import { FriendsPage } from '../chat/FriendsPage'; // These will be replaced with real imports as each task is completed: import { MobileDmsScreen } from './MobileDmsScreen'; import { MobileYouScreen } from './MobileYouScreen'; @@ -25,7 +26,7 @@ const MobileVoiceFullScreen = () => ; const screenMap: Record) => React.ReactNode> = { 'channel-chat': (params) => , - 'friends': () => , + 'friends': () => , 'settings': () => , 'settings-account': () => , 'settings-voice': () => ,