forked from github/cinny
Properly declare new hangup method sig
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user