Move the safety number viewer into modal
This commit is contained in:
parent
8c34d6ebc2
commit
048e1e4cd7
14 changed files with 132 additions and 167 deletions
27
ts/state/smart/SafetyNumberModal.tsx
Normal file
27
ts/state/smart/SafetyNumberModal.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
import { SafetyNumberModal } from '../../components/SafetyNumberModal';
|
||||
import { StateType } from '../reducer';
|
||||
import { getContactSafetyNumber } from '../selectors/safetyNumber';
|
||||
import { getConversationSelector } from '../selectors/conversations';
|
||||
import { getIntl } from '../selectors/user';
|
||||
|
||||
export type Props = {
|
||||
contactID: string;
|
||||
};
|
||||
|
||||
const mapStateToProps = (state: StateType, props: Props) => {
|
||||
return {
|
||||
...props,
|
||||
...getContactSafetyNumber(state, props),
|
||||
contact: getConversationSelector(state)(props.contactID),
|
||||
i18n: getIntl(state),
|
||||
};
|
||||
};
|
||||
|
||||
const smart = connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
export const SmartSafetyNumberModal = smart(SafetyNumberModal);
|
Loading…
Add table
Add a link
Reference in a new issue