e1-bsd/omni-common-ui

View on GitHub
src/containers/Header/NotificationsTray/index.jsx

Summary

Maintainability
B
6 hrs
Test Coverage

File index.jsx has 278 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import styles from './style.postcss';

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Set } from 'immutable';
Severity: Minor
Found in src/containers/Header/NotificationsTray/index.jsx - About 2 hrs to fix

    Function _renderCalloutPopupContent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      _renderCalloutPopupContent() {
        const { notifications } = this.props;
        const { viewingNotification } = this.state;
        const headerBtnClassName = classnames(styles.NotificationsTray_popup_heading_btn,
          testClass('mark-as-read'),
    Severity: Minor
    Found in src/containers/Header/NotificationsTray/index.jsx - About 1 hr to fix

      Function _renderNotificationFooter has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        _renderNotificationFooter(notifications) {
          const markBtnClassName = classnames(styles.NotificationsTray_notification_footer_mark,
            testClass('notification-mark'));
          if (this.state.isMarkingMode) {
            return <div className={styles.NotificationsTray_notification_footer}>
      Severity: Minor
      Found in src/containers/Header/NotificationsTray/index.jsx - About 1 hr to fix

        Function mapDispatchToProps has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function mapDispatchToProps(dispatch) {
          const markAsReadDispatchConfig = Config.get('notificationsTray').markAsRead.dispatch;
          const apiUrl = buildUrl(markAsReadDispatchConfig.apiUrl);
          const method = markAsReadDispatchConfig.method;
          return {
        Severity: Minor
        Found in src/containers/Header/NotificationsTray/index.jsx - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status