Move the safety number viewer into modal

This commit is contained in:
Josh Perez 2021-10-06 16:27:14 -04:00 committed by GitHub
parent 8c34d6ebc2
commit 048e1e4cd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 132 additions and 167 deletions

View file

@ -10,6 +10,9 @@ type PropsType = {
// ProfileEditor
isProfileEditorVisible: boolean;
renderProfileEditor: () => JSX.Element;
// SafetyNumberModal
safetyNumberModalContactId?: string;
renderSafetyNumber: () => JSX.Element;
};
export const GlobalModalContainer = ({
@ -19,7 +22,14 @@ export const GlobalModalContainer = ({
// ProfileEditor
isProfileEditorVisible,
renderProfileEditor,
// SafetyNumberModal
safetyNumberModalContactId,
renderSafetyNumber,
}: PropsType): JSX.Element | null => {
if (safetyNumberModalContactId) {
return renderSafetyNumber();
}
if (contactModalState) {
return renderContactModal();
}