Properly declare new hangup method sig

This commit is contained in:
Gigiaj 2025-05-25 16:34:55 -05:00
parent f3c0aebda2
commit 22903c9340

View file

@ -30,7 +30,7 @@ interface CallContextState {
setActiveCallRoomId: (roomId: string | null) => void; setActiveCallRoomId: (roomId: string | null) => void;
viewedCallRoomId: string | null; viewedCallRoomId: string | null;
setViewedCallRoomId: (roomId: string | null) => void; setViewedCallRoomId: (roomId: string | null) => void;
hangUp: () => void; hangUp: (room: string) => void;
activeClientWidgetApi: ClientWidgetApi | null; activeClientWidgetApi: ClientWidgetApi | null;
activeClientWidget: SmallWidget | null; activeClientWidget: SmallWidget | null;
registerActiveClientWidgetApi: ( registerActiveClientWidgetApi: (
@ -204,7 +204,7 @@ export function CallProvider({ children }: CallProviderProps) {
); );
const hangUp = useCallback( const hangUp = useCallback(
(nextRoom) => { (nextRoom: string) => {
setIsCallActive(false); setIsCallActive(false);
if (typeof nextRoom !== 'string') { if (typeof nextRoom !== 'string') {
if (viewedCallRoomId === activeCallRoomId) { if (viewedCallRoomId === activeCallRoomId) {