mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
12 lines
367 B
TypeScript
12 lines
367 B
TypeScript
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { store } from '../../store/store';
|
|
|
|
export function connectWithStore(WrappedComponent: any, ...args: any[]) {
|
|
const ConnectedWrappedComponent = (connect as any)(...args)(WrappedComponent);
|
|
|
|
return (props: any) => {
|
|
return <ConnectedWrappedComponent {...props} store={store} />;
|
|
};
|
|
}
|