bigbuffet-rw/app/soapbox/features/ui/components/theme_toggle_container.js
2020-10-01 19:33:03 -05:00

17 lines
445 B
JavaScript

import { connect } from 'react-redux';
import { changeSetting, getSettings } from 'soapbox/actions/settings';
import ThemeToggle from './theme_toggle';
const mapStateToProps = state => {
return {
settings: getSettings(state),
};
};
const mapDispatchToProps = (dispatch) => ({
onToggle(setting) {
dispatch(changeSetting(['themeMode'], setting));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(ThemeToggle);