RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/views/marketplace/hooks/useAppInfo.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function useAppInfo has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useAppInfo = (appId: string, context: string): AppInfo | undefined => {
    const { installedApps, marketplaceApps, privateApps } = useContext(AppsContext);

    const [appData, setAppData] = useState<AppInfo>();

Severity: Major
Found in apps/meteor/client/views/marketplace/hooks/useAppInfo.ts - About 2 hrs to fix

    Function fetchAppInfo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            const fetchAppInfo = async (): Promise<void> => {
                if ((!marketplaceApps.value?.apps?.length && !installedApps.value?.apps.length && !privateApps.value?.apps.length) || !appId) {
                    return;
                }
    
    
    Severity: Minor
    Found in apps/meteor/client/views/marketplace/hooks/useAppInfo.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status