RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/hooks/useDeviceLogout.tsx

Summary

Maintainability
A
2 hrs
Test Coverage

Function useDeviceLogout has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useDeviceLogout = (
    sessionId: string,
    endpoint: '/v1/sessions/logout' | '/v1/sessions/logout.me',
): ((onReload: () => void) => void) => {
    const t = useTranslation();
Severity: Minor
Found in apps/meteor/client/hooks/useDeviceLogout.tsx - About 1 hr to fix

    Function handleLogoutDeviceModal has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            (onReload: () => void) => {
                const closeModal = (): void => setModal(null);
    
                const handleLogoutDevice = async (): Promise<void> => {
                    try {
    Severity: Minor
    Found in apps/meteor/client/hooks/useDeviceLogout.tsx - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status