lbry-desktop/ui/js/page/search/index.js
2017-05-05 15:01:16 +07:00

30 lines
668 B
JavaScript

import React from 'react'
import {
connect,
} from 'react-redux'
import {
doSearchContent,
} from 'actions/search'
import {
selectIsSearching,
selectSearchQuery,
selectCurrentSearchResults,
selectSearchActivated,
} from 'selectors/search'
import {
doNavigate,
} from 'actions/app'
import SearchPage from './view'
const select = (state) => ({
isSearching: selectIsSearching(state),
query: selectSearchQuery(state),
results: selectCurrentSearchResults(state),
searchActive: selectSearchActivated(state),
})
const perform = (dispatch) => ({
navigate: (path) => dispatch(doNavigate(path)),
})
export default connect(select, perform)(SearchPage)