339945018d
and refactor history
23 lines
647 B
JavaScript
23 lines
647 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/navigation";
|
|
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);
|