1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 05:12:18 +01:00
metamask-extension/ui/pages/settings/experimental-tab/experimental-tab.container.js
David Walsh d468c9dbde
Dark Mode: Elevate the theme dropdown from experimental to regular settings (#15865)
* Dark Mode: Elevate the theme dropdown from experimental to regular settings

* Fix search

* Fix test

* Adjust settings order

* removing renderTheme call from experimental tab and rearranging setting ref number in general tab

Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com>
2022-09-23 10:15:02 -05:00

42 lines
1.2 KiB
JavaScript

import { compose } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import {
setUseCollectibleDetection,
setOpenSeaEnabled,
setEIP1559V2Enabled,
setCustomNetworkListEnabled,
} from '../../../store/actions';
import {
getUseCollectibleDetection,
getOpenSeaEnabled,
getEIP1559V2Enabled,
getIsCustomNetworkListEnabled,
} from '../../../selectors';
import ExperimentalTab from './experimental-tab.component';
const mapStateToProps = (state) => {
return {
useCollectibleDetection: getUseCollectibleDetection(state),
openSeaEnabled: getOpenSeaEnabled(state),
eip1559V2Enabled: getEIP1559V2Enabled(state),
customNetworkListEnabled: getIsCustomNetworkListEnabled(state),
};
};
const mapDispatchToProps = (dispatch) => {
return {
setUseCollectibleDetection: (val) =>
dispatch(setUseCollectibleDetection(val)),
setOpenSeaEnabled: (val) => dispatch(setOpenSeaEnabled(val)),
setEIP1559V2Enabled: (val) => dispatch(setEIP1559V2Enabled(val)),
setCustomNetworkListEnabled: (val) =>
dispatch(setCustomNetworkListEnabled(val)),
};
};
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(ExperimentalTab);