text: import React, { Component } from 'react';
  import PropTypes from 'prop-types';
  import { bindActionCreators } from 'redux';
  import { connect } from 'react-redux';
  import TransferTableRow from './TransferTableRow';
  import ReactTooltip from 'react-tooltip';
  
  class ItemList extends Component {
    /*
     * This component render panel group of accordions
     * Props: Listed in ItemList.propTypes below
     *        All props are fetch from redux
     *  Usage: <ItemList />
     * */
    render() {
      return (
        <div className="panel-group panel-group-control panel-group-control-right content-group-lg">
          <h2 className="col-md-12 text-center text-bold yes-print">
           Returned Sale Item List
          </h2>
          <ReactTooltip place="bottom"/>
          <table className="table table-hover table-xs">
            <thead>
              <tr className="bg-primary">
                <th data-tip="Transfer date">Date</th>
                <th data-tip="Invoice Number">Invoice Number</th>
                <th data-tip="Total quantity">Quantity</th>
                <th className="text-center">Actions</th>
              </tr>
            </thead>
            <tbody>
            {this.props.items.results.map(obj => {
              return (
                    <TransferTableRow instance={obj}/>
              );
            })
            }
            <tr>
              <td colSpan={5}>
              {this.props.items.results.length === 0 &&
              <div className="text-center">
                {this.props.items.loading &&
                  <h4 className="text-bold">Loading...</h4>
                }
                {!this.props.items.loading &&
                  <h4 className="text-bold">No data Found</h4>
                }
              </div>
              }
              </td>
            </tr>
            </tbody>
          </table>
        </div>
      );
    }
  }
  
  ItemList.propTypes = {
    items: PropTypes.array.isRequired
  };
  function mapStateToProps(state) {
    return {
      items: state.items
    };
  }
  
  function matchDispatchToProps(dispatch) {
    return bindActionCreators({}, dispatch);
  }
  export default connect(mapStateToProps, matchDispatchToProps)(ItemList);
  