import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { icons } from 'Helpers/Props'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; import TablePager from 'Components/Table/TablePager'; import PageContent from 'Components/Page/PageContent'; import PageContentBodyConnector from 'Components/Page/PageContentBodyConnector'; import PageToolbar from 'Components/Page/Toolbar/PageToolbar'; import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; import BlacklistRowConnector from './BlacklistRowConnector'; class Blacklist extends Component { // // Render render() { const { isFetching, isPopulated, error, items, columns, totalRecords, isClearingBlacklistExecuting, onClearBlacklistPress, ...otherProps } = this.props; return ( { isFetching && !isPopulated && } { !isFetching && !!error &&
Unable to load blacklist
} { isPopulated && !error && !items.length &&
No history blacklist
} { isPopulated && !error && !!items.length &&
{ items.map((item) => { return ( ); }) }
}
); } } Blacklist.propTypes = { isFetching: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired, error: PropTypes.object, items: PropTypes.arrayOf(PropTypes.object).isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired, totalRecords: PropTypes.number, isClearingBlacklistExecuting: PropTypes.bool.isRequired, onClearBlacklistPress: PropTypes.func.isRequired }; export default Blacklist;