Merge pull request #16103 from ramonlsouza/condit-hook-talking

refactor: conditional hook in talking indicator
This commit is contained in:
Ramón Souza 2022-12-08 17:34:32 -03:00 committed by GitHub
commit 9bf832ca42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,9 @@ const TALKING_INDICATOR_MUTE_INTERVAL = 500;
const TALKING_INDICATORS_MAX = 8;
const TalkingIndicatorContainer = (props) => {
const usingUsersContext = useContext(UsersContext);
const { users } = usingUsersContext;
if (!enableTalkingIndicator) return null;
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
@ -24,9 +27,6 @@ const TalkingIndicatorContainer = (props) => {
const { sidebarNavPanel } = sidebarNavigation;
const layoutContextDispatch = layoutDispatch();
const usingUsersContext = useContext(UsersContext);
const { users } = usingUsersContext;
return (
<TalkingIndicator
{...{