mirror of
https://git.vectorsigma.ru/public/AdGuardHome.git
synced 2026-08-01 18:59:24 +00:00
59 lines
1.0 KiB
JavaScript
59 lines
1.0 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
initSettings,
|
|
toggleSetting,
|
|
handleUpstreamChange,
|
|
setUpstream,
|
|
testUpstream,
|
|
addErrorToast,
|
|
toggleDhcp,
|
|
getDhcpStatus,
|
|
getDhcpInterfaces,
|
|
setDhcpConfig,
|
|
findActiveDhcp,
|
|
} from '../actions';
|
|
import {
|
|
getTlsStatus,
|
|
setTlsConfig,
|
|
validateTlsConfig,
|
|
} from '../actions/encryption';
|
|
import Settings from '../components/Settings';
|
|
|
|
const mapStateToProps = (state) => {
|
|
const {
|
|
settings,
|
|
dashboard,
|
|
dhcp,
|
|
encryption,
|
|
} = state;
|
|
const props = {
|
|
settings,
|
|
dashboard,
|
|
dhcp,
|
|
encryption,
|
|
};
|
|
return props;
|
|
};
|
|
|
|
const mapDispatchToProps = {
|
|
initSettings,
|
|
toggleSetting,
|
|
handleUpstreamChange,
|
|
setUpstream,
|
|
testUpstream,
|
|
addErrorToast,
|
|
toggleDhcp,
|
|
getDhcpStatus,
|
|
getDhcpInterfaces,
|
|
setDhcpConfig,
|
|
findActiveDhcp,
|
|
getTlsStatus,
|
|
setTlsConfig,
|
|
validateTlsConfig,
|
|
};
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(Settings);
|