badguardhome/client/src/containers/Dns.js

46 lines
1.0 KiB
JavaScript
Raw Normal View History

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