signal-desktop/ts/state/roots/createCompositionArea.tsx

17 lines
546 B
TypeScript
Raw Normal View History

2019-05-24 23:58:27 +00:00
import React from 'react';
import { Provider } from 'react-redux';
import { Store } from 'redux';
import { SmartCompositionArea } from '../smart/CompositionArea';
2019-05-24 23:58:27 +00:00
// Workaround: A react component's required properties are filtering up through connect()
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31363
const FilteredCompositionArea = SmartCompositionArea as any;
2019-05-24 23:58:27 +00:00
export const createCompositionArea = (store: Store, props: Object) => (
2019-05-24 23:58:27 +00:00
<Provider store={store}>
<FilteredCompositionArea {...props} />
2019-05-24 23:58:27 +00:00
</Provider>
);