Skip to content
Snippets Groups Projects
Commit bc9eb9e4 authored by rique223's avatar rique223
Browse files

refactor: :recycle: Remove unnecessary console.log and add isLoggingIn from...

refactor: :recycle: Remove unnecessary console.log and add isLoggingIn from useConnectionStatus to updateVideoConfuser hook
parent e982bd76
No related branches found
No related tags found
No related merge requests found
import { useConnectionStatus, useUserId } from '@rocket.chat/ui-contexts';
import { useEffect } from 'react';
import { VideoConfManager } from '../../../lib/VideoConfManager';
export const useUpdateVideoConfUser = () => {
const [userId, isLoggingIn, isConnected] = [Meteor.userId(), Meteor.loggingIn(), Meteor.status().connected];
const userId = useUserId();
const { connected, isLoggingIn } = useConnectionStatus();
useEffect(() => {
console.log('[VideoConf] useUpdateVideoConfUser hook called with:', {
userId,
isLoggingIn,
isConnected,
});
VideoConfManager.updateUser(userId, isLoggingIn, isConnected);
}, [userId, isLoggingIn, isConnected]);
VideoConfManager.updateUser(userId, isLoggingIn, connected);
}, [userId, isLoggingIn, connected]);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment