From e91a859c5c7f0f8db8127398daae93e1f0805d97 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Thu, 4 Aug 2022 15:59:49 -0700 Subject: [PATCH] fix trigger on every render eslint warning --- web/components/groups/group-chat.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/components/groups/group-chat.tsx b/web/components/groups/group-chat.tsx index 35de73c5..db7e558b 100644 --- a/web/components/groups/group-chat.tsx +++ b/web/components/groups/group-chat.tsx @@ -93,7 +93,8 @@ export function GroupChat(props: { useEffect(() => { // is mobile? if (width && width > 720) focusInput() - }, [width, focusInput]) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [width]) function onReplyClick(comment: Comment) { setReplyToUser({ id: comment.userId, username: comment.userUsername })