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 CircleDropdown from '../components/circle_dropdown';
import { changeComposeCircle } from '../../../actions/compose'; import { changeComposeCircle } from '../../../actions/compose';
const mapStateToProps = state => { const mapStateToProps = state => ({
let value = state.getIn(['compose', 'circle_id']); value: state.getIn(['compose', 'circle_id']) ?? '',
value = value === null ? '' : value; visible: state.getIn(['compose', 'privacy']) === 'limited',
limitedReply: state.getIn(['compose', 'privacy']) === 'limited' && state.getIn(['compose', 'reply_status', 'visibility']) === 'limited',
return { });
value: value,
visible: state.getIn(['compose', 'privacy']) === 'limited',
limitedReply: state.getIn(['compose', 'privacy']) === 'limited' && state.getIn(['compose', 'reply_status', 'visibility']) === 'limited',
};
};
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = dispatch => ({