+ client: handle the new statistics format
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { getClients, getTopStats } from '../actions';
|
||||
import { getClients } from '../actions';
|
||||
import { getStats } from '../actions/stats';
|
||||
import { addClient, updateClient, deleteClient, toggleClientModal } from '../actions/clients';
|
||||
import Clients from '../components/Settings/Clients';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { dashboard, clients } = state;
|
||||
const { dashboard, clients, stats } = state;
|
||||
const props = {
|
||||
dashboard,
|
||||
clients,
|
||||
stats,
|
||||
};
|
||||
return props;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
getClients,
|
||||
getTopStats,
|
||||
getStats,
|
||||
addClient,
|
||||
updateClient,
|
||||
deleteClient,
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
import { connect } from 'react-redux';
|
||||
import * as actionCreators from '../actions';
|
||||
import { toggleProtection, getClients } from '../actions';
|
||||
import { getStats, getStatsConfig, setStatsConfig } from '../actions/stats';
|
||||
import Dashboard from '../components/Dashboard';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { dashboard } = state;
|
||||
const props = { dashboard };
|
||||
const { dashboard, stats } = state;
|
||||
const props = { dashboard, stats };
|
||||
return props;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
toggleProtection,
|
||||
getClients,
|
||||
getStats,
|
||||
getStatsConfig,
|
||||
setStatsConfig,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
actionCreators,
|
||||
mapDispatchToProps,
|
||||
)(Dashboard);
|
||||
|
||||
Reference in New Issue
Block a user