File: /var/www/lipovac/wp-content/plugins/the-events-calendar/common/src/modules/hoc/with-store.js
/**
* External dependencies
*/
import React from 'react';
/**
* Internal dependencies
*/
import { store } from '@moderntribe/common/store';
const getStore = () => store;
export default ( additionalProps = {} ) => ( WrappedComponent ) => {
const WithStore = ( props ) => {
const extraProps = {
...additionalProps,
store: getStore(),
};
return <WrappedComponent { ...props } { ...extraProps } />;
};
return WithStore;
};