RocketChat/Rocket.Chat

View on GitHub
apps/meteor/app/analytics/client/loadScript.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Function useAnalytics has 100 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useAnalytics = (): void => {
    const uid = useReactiveValue(() => Meteor.userId());

    const googleId = useReactiveValue(() => settings.get('GoogleAnalytics_enabled') && settings.get('GoogleAnalytics_ID'));
    const piwikUrl = useReactiveValue(() => settings.get('PiwikAnalytics_enabled') && settings.get('PiwikAnalytics_url'));
Severity: Major
Found in apps/meteor/app/analytics/client/loadScript.ts - About 4 hrs to fix

    There are no issues that match your filters.

    Category
    Status