(state, ownProps)
| 153 | } |
| 154 | |
| 155 | const mapStateToProps = (state, ownProps) => { |
| 156 | const { query, sortingFields } = ownProps; |
| 157 | |
| 158 | if (sortingFields) { |
| 159 | const { field, direction } = query.getSort(); |
| 160 | |
| 161 | return { |
| 162 | sortField: field, |
| 163 | sortDirection: direction, |
| 164 | }; |
| 165 | } |
| 166 | return {}; |
| 167 | }; |
| 168 | |
| 169 | export default compose(connect(mapStateToProps), injectIntl)(SortingBar); |