summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-search/src/components/Results.js
blob: 99bc63dfe43fac1256892de5ca2f9ccd72ef7771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const GitBook = require('gitbook-core');
const { React } = GitBook;

const SearchResults = React.createClass({
    propTypes: {
        results: GitBook.Shapes.list
    },

    render() {
        const { results } = this.props;

        return (
            <div className="Search/Results">
                {results.map(result => {

                })}
            </div>
        );
    }
});

function mapStateToProps(state) {
    return {
        results: state.search.results
    };
}

module.exports = GitBook.connect(SearchResults, mapStateToProps);