Fix CircleDropdown

This commit is contained in:
noellabo 2021-07-30 15:32:05 +09:00
parent 30be912026
commit cf642b0b8f

View file

@ -2,16 +2,11 @@ import { connect } from 'react-redux';
import CircleDropdown from '../components/circle_dropdown';
import { changeComposeCircle } from '../../../actions/compose';
const mapStateToProps = state => {
let value = state.getIn(['compose', 'circle_id']);
value = value === null ? '' : value;
return {
value: value,
visible: state.getIn(['compose', 'privacy']) === 'limited',
limitedReply: state.getIn(['compose', 'privacy']) === 'limited' && state.getIn(['compose', 'reply_status', 'visibility']) === 'limited',
};
};
const mapStateToProps = state => ({
value: state.getIn(['compose', 'circle_id']) ?? '',
visible: state.getIn(['compose', 'privacy']) === 'limited',
limitedReply: state.getIn(['compose', 'privacy']) === 'limited' && state.getIn(['compose', 'reply_status', 'visibility']) === 'limited',
});
const mapDispatchToProps = dispatch => ({