RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/views/room/hooks/useMessageListNavigation.ts

Summary

Maintainability
B
6 hrs
Test Coverage

Function useMessageListNavigation has 83 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useMessageListNavigation = (): { messageListRef: RefCallback<HTMLElement> } => {
    const roomFocusManager = useFocusManager();

    const messageListRef = useCallback(
        (node: HTMLElement | null) => {
Severity: Major
Found in apps/meteor/client/views/room/hooks/useMessageListNavigation.ts - About 3 hrs to fix

    Function messageListRef has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            (node: HTMLElement | null) => {
                let lastMessageFocused: HTMLElement | null = null;
                let initialFocus = true;
    
                if (!node) {
    Severity: Major
    Found in apps/meteor/client/views/room/hooks/useMessageListNavigation.ts - About 2 hrs to fix

      There are no issues that match your filters.

      Category
      Status