summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/renderWithStore.js
blob: af867043c6b6d950f719fe768acdc4791c1697d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const React = require('react');
const { Provider } = require('react-redux');
const { InjectedComponent } = require('./components/InjectedComponent');

/**
 * Render the application for a store
 * @param  {ReduxStore} store
 * @return {React.Element} element
 */
function renderWithStore(store) {
    return (
        <Provider store={store}>
            <InjectedComponent matching={{ role: 'Body' }} />
        </Provider>
    );
}

module.exports = renderWithStore;