mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
18 lines
662 B
JavaScript
18 lines
662 B
JavaScript
![]() |
import React from 'react';
|
||
|
import { connect } from 'react-redux';
|
||
|
import { injectIntl } from 'react-intl';
|
||
|
import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';
|
||
|
import Search from '../components/search';
|
||
|
|
||
|
const mapStateToProps = state => ({
|
||
|
value: state.getIn(['listEditor', 'suggestions', 'value']),
|
||
|
});
|
||
|
|
||
|
const mapDispatchToProps = dispatch => ({
|
||
|
onSubmit: value => dispatch(fetchListSuggestions(value)),
|
||
|
onClear: () => dispatch(clearListSuggestions()),
|
||
|
onChange: value => dispatch(changeListSuggestions(value)),
|
||
|
});
|
||
|
|
||
|
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Search));
|