diff --git a/src/app/pages/client/ClientLayout.tsx b/src/app/pages/client/ClientLayout.tsx index 4a077ba6..bf598ff8 100644 --- a/src/app/pages/client/ClientLayout.tsx +++ b/src/app/pages/client/ClientLayout.tsx @@ -1,15 +1,42 @@ -import React, { ReactNode } from 'react'; +import React, { ReactNode, useMemo } from 'react'; import { Box } from 'folds'; +import { useCallState } from './CallProvider'; +import { useParams } from 'react-router-dom'; +import { PersistentCallContainer } from '../call/PersistentCallContainer'; type ClientLayoutProps = { nav: ReactNode; children: ReactNode; }; export function ClientLayout({ nav, children }: ClientLayoutProps) { + const { activeCallRoomId } = useCallState(); + const { roomIdOrAlias: viewedRoomId } = useParams(); + const isViewingActiveCall = useMemo( + () => activeCallRoomId !== null && activeCallRoomId === viewedRoomId, + [activeCallRoomId, viewedRoomId] + ); return ( - - {nav} - {children} + + + {nav} + + + + + {children} + + + + {' '} ); }