grafana/public/app/core/utils/connectWithReduxStore.tsx
Tobias Skarhed 83da3660da
Chore: noImplictAny no errors left (#18303)
* Add types and rewrite datasourceChanged to async/await
2019-08-01 14:38:34 +02:00

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} />;
};
}