import {connect} from 'react-redux';
import {add_dialog_msg,get_dashboard, clear_dashboard} from '../actions';
import DashBoard from '../components/DashBoard';

const mapStateToProps = (state) => ({
	i18n: state.i18n,
    data: state.sysinfo.dashboard,
    show: state.ui.showDashboard
});

const mapDispatchToProps = (dispatch, ownProps) => ({
	showDialog: (msg) => {
		dispatch(add_dialog_msg(msg));
	},
    clearList: () => {
        dispatch(clear_dashboard());
    },
    getDashboard: () => {
        dispatch(get_dashboard());
    }
})

export default connect(mapStateToProps, mapDispatchToProps)(DashBoard);