From 40a25aa03e52942d06b52f1fd7d3df93cd50920c Mon Sep 17 00:00:00 2001 From: GigiaJ Date: Mon, 21 Apr 2025 01:39:36 -0400 Subject: [PATCH] Move out bottom nav into own file --- src/app/pages/client/space/Space.tsx | 64 +--------------------------- 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/src/app/pages/client/space/Space.tsx b/src/app/pages/client/space/Space.tsx index 9dcd730a..8f2d0fdb 100644 --- a/src/app/pages/client/space/Space.tsx +++ b/src/app/pages/client/space/Space.tsx @@ -79,6 +79,7 @@ import { } from '../../../hooks/useRoomsNotificationPreferences'; import { useOpenSpaceSettings } from '../../../state/hooks/spaceSettings'; import { useCallState } from '../CallProvider'; +import { CallNavBottom } from '../../call/CallNavBottom'; /** * Processes the raw hierarchy from useSpaceJoinedHierarchy into a flat list @@ -357,67 +358,6 @@ function SpaceHeader() { ); } -function FixedBottomNavArea() { - const { - sendWidgetAction, - activeCallRoomId, - isAudioEnabled, - isVideoEnabled, - toggleAudio, - toggleVideo, - hangUp, - } = useCallState(); - const mx = useMatrixClient(); - const userName = mx.getUser(mx.getUserId() ?? '')?.displayName ?? mx.getUserId() ?? 'User'; - - const handleSendMessageClick = () => { - const action = 'my.custom.action'; - const data = { message: `Hello from ${userName}!` }; - logger.debug(`FixedBottomNavArea: Sending action '${action}'`); - sendWidgetAction(action, data) - .then(() => logger.info(`FixedBottomNavArea: Action '${action}' sent.`)) - .catch((err) => logger.error(`FixedBottomNavArea: Failed action '${action}':`, err)); - }; - - if (!activeCallRoomId) { - return ( - - - No active call - - - ); - } - - return ( - - - {/* Going to need better icons for this */} - - - - - - - {mx.getRoom(activeCallRoomId)?.normalizedName} - - ); -} - export function Space() { const mx = useMatrixClient(); const space = useSpace(); @@ -607,7 +547,7 @@ export function Space() { })} - + ); }