lbry-desktop/ui/js/component/fileListSearch/index.js
2017-06-06 17:19:12 -04:00

23 lines
640 B
JavaScript

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