bigbuffet-rw/app/soapbox/features/compose/containers/schedule_form_container.js
2021-06-18 16:04:31 +00:00

16 lines
487 B
JavaScript

import { connect } from 'react-redux';
import ScheduleForm from '../components/schedule_form';
import { setSchedule } from '../../../actions/compose';
const mapStateToProps = state => ({
schedule: state.getIn(['compose', 'schedule']),
active: state.getIn(['compose', 'schedule']) ? true : false,
});
const mapDispatchToProps = dispatch => ({
onSchedule(date) {
dispatch(setSchedule(date));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(ScheduleForm);