import React, { Component, Fragment } from 'react'; import { withNamespaces } from 'react-i18next'; import PropTypes from 'prop-types'; import ClientsTable from './ClientsTable'; import AutoClients from './AutoClients'; import PageTitle from '../../ui/PageTitle'; import Loading from '../../ui/Loading'; class Clients extends Component { render() { const { t, dashboard, clients, addClient, updateClient, deleteClient, toggleClientModal, } = this.props; return ( {(dashboard.processingTopStats || dashboard.processingClients) && } {!dashboard.processingTopStats && !dashboard.processingClients && ( )} ); } } Clients.propTypes = { t: PropTypes.func.isRequired, dashboard: PropTypes.object.isRequired, clients: PropTypes.object.isRequired, toggleClientModal: PropTypes.func.isRequired, deleteClient: PropTypes.func.isRequired, addClient: PropTypes.func.isRequired, updateClient: PropTypes.func.isRequired, topStats: PropTypes.object, }; export default withNamespaces()(Clients);