badguardhome/client/src/containers/Dns.js
2019-12-10 16:01:18 +03:00

46 lines
1.0 KiB
JavaScript

import { connect } from 'react-redux';
import { handleUpstreamChange, setUpstream, testUpstream, getDnsSettings } from '../actions';
import { getAccessList, setAccessList } from '../actions/access';
import {
getRewritesList,
addRewrite,
deleteRewrite,
toggleRewritesModal,
} from '../actions/rewrites';
import { getDnsConfig, setDnsConfig } from '../actions/dnsConfig';
import Dns from '../components/Settings/Dns';
const mapStateToProps = (state) => {
const {
dashboard, settings, access, rewrites, dnsConfig,
} = state;
const props = {
dashboard,
settings,
access,
rewrites,
dnsConfig,
};
return props;
};
const mapDispatchToProps = {
handleUpstreamChange,
setUpstream,
testUpstream,
getAccessList,
setAccessList,
getRewritesList,
addRewrite,
deleteRewrite,
toggleRewritesModal,
getDnsSettings,
getDnsConfig,
setDnsConfig,
};
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Dns);