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

26 lines
841 B
TypeScript
Raw Normal View History

2021-10-05 16:47:06 +00:00
// Copyright 2021 Signal Messenger, LLC
2020-10-30 20:34:04 +00:00
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { Provider } from 'react-redux';
import type { Store } from 'redux';
import type { PropsType } from '../smart/ConversationView';
import { SmartConversationView } from '../smart/ConversationView';
// Workaround: A react component's required properties are filtering up through connect()
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31363
/* eslint-disable @typescript-eslint/no-explicit-any */
2021-10-05 16:47:06 +00:00
const FilteredConversationView = SmartConversationView as any;
/* eslint-disable @typescript-eslint/no-explicit-any */
2021-10-05 16:47:06 +00:00
export const createConversationView = (
store: Store,
2021-10-05 16:47:06 +00:00
props: PropsType
): React.ReactElement => (
<Provider store={store}>
2021-10-05 16:47:06 +00:00
<FilteredConversationView {...props} />
</Provider>
);