import { connect } from 'react-redux';
import { add_dialog_msg, toggle_loading, getRequest } from '../../actions';
import ModbusPreview from '../../components/AdminPage/ModbusPreview';

const mapStateToProps = (state) => ({
    i18n: state.i18n
});

const mapDispatchToProps = (dispatch, ownProps) => ({
    showDialog: (msg) => {
        dispatch(add_dialog_msg(msg));
    },
    toggleLoading: (flag = false) => {
        dispatch(toggle_loading(flag));
    },
    getRequest
})

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