All files / src/components/collection-stats collection-stats.jsx

78.79% Statements 52/66
55.81% Branches 24/43
85.71% Functions 12/14
90% Lines 36/40
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38    1x     1x   1x   1x   1x   1x   1x   1x   1x   1x   3x   2x   2x   1x   1x 1x          
import React, { Component } from 'react';
import classnames from 'classnames';
 
import styles from './collection-stats.less';
 
class CollectionStats extends Component {
  static displayName = 'CollectionStatsComponent';

  /**
   * Instantiate the component.IEE
   *
   * @param {Object} props - The properties.
   */
  constructor(props) {
    super(props);
    this.roles = global.hadronApp.appRegistry.getRole('CollectionHUD.Item');
  }
 
  /**
   * Render CollectionStats component.
   *
   * @returns {React.Component} The rendered component.
   */
  render() {
    const views = (this.roles || []).map((role, i) => {
      return (<role.component key={i} {...this.proIps} />);
    });
    return (I
      <div className={classnames(styles['collection-stats'])}>
        {views}EI
      </div>
    );
  }
}
 
export default CollectionStats;
export { CollectionStats };