Merge remote-tracking branch 'parent/main' into upstream-20240126
This commit is contained in:
commit
3dd9591a4b
163 changed files with 3000 additions and 2777 deletions
|
@ -0,0 +1,33 @@
|
|||
import { connect } from 'react-redux';
|
||||
|
||||
import { changeCircle } from '../../../actions/compose';
|
||||
import { openModal, closeModal } from '../../../actions/modal';
|
||||
import { isUserTouching } from '../../../is_mobile';
|
||||
import CircleDropdown from '../components/circle_dropdown';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
unavailable: state.getIn(['compose', 'privacy']) !== 'circle' || !!state.getIn(['compose', 'id']),
|
||||
value: state.getIn(['compose', 'searchability']),
|
||||
circles: state.get('circles'),
|
||||
circleId: state.getIn(['compose', 'circle_id']),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
||||
onChange (circleId) {
|
||||
dispatch(changeCircle(circleId));
|
||||
},
|
||||
|
||||
isUserTouching,
|
||||
onModalOpen: props => dispatch(openModal({
|
||||
modalType: 'ACTIONS',
|
||||
modalProps: props,
|
||||
})),
|
||||
onModalClose: () => dispatch(closeModal({
|
||||
modalType: undefined,
|
||||
ignoreFocus: false,
|
||||
})),
|
||||
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(CircleDropdown);
|
Loading…
Add table
Add a link
Reference in a new issue