mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
12 lines
339 B
TypeScript
12 lines
339 B
TypeScript
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { store } from '../../store/store';
|
|
|
|
export function connectWithStore(WrappedComponent, ...args) {
|
|
const ConnectedWrappedComponent = connect(...args)(WrappedComponent);
|
|
|
|
return props => {
|
|
return <ConnectedWrappedComponent {...props} store={store} />;
|
|
};
|
|
}
|