fix trigger on every render eslint warning

This commit is contained in:
Sinclair Chen 2022-08-04 15:59:49 -07:00
parent bb6a63a230
commit e91a859c5c

View File

@ -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 })