apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
Function useMessageBoxAutoFocus
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useMessageBoxAutoFocus = (enabled: boolean): Ref<HTMLElement> => {
const ref = useRef<HTMLElement>();
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
Avoid too many return
statements within this function. Open
Open
return;