You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			73 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			TypeScript
		
	
		
		
			
		
	
	
			73 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			TypeScript
		
	
| 
											4 years ago
										 | import React from 'react'; | ||
|  | import { useSelector } from 'react-redux'; | ||
|  | import { | ||
|  |   getAddModeratorsModal, | ||
|  |   getAdminLeaveClosedGroupDialog, | ||
|  |   getChangeNickNameDialog, | ||
|  |   getConfirmModal, | ||
| 
											4 years ago
										 |   getDeleteAccountModalState, | ||
| 
											4 years ago
										 |   getEditProfileDialog, | ||
|  |   getInviteContactModal, | ||
|  |   getOnionPathDialog, | ||
|  |   getRecoveryPhraseDialog, | ||
|  |   getRemoveModeratorsModal, | ||
|  |   getSessionPasswordDialog, | ||
|  |   getUpdateGroupMembersModal, | ||
|  |   getUpdateGroupNameModal, | ||
|  |   getUserDetailsModal, | ||
|  | } from '../../state/selectors/modal'; | ||
| 
											4 years ago
										 | import { AdminLeaveClosedGroupDialog } from './AdminLeaveClosedGroupDialog'; | ||
|  | import { InviteContactsDialog } from './InviteContactsDialog'; | ||
|  | import { DeleteAccountModal } from './DeleteAccountModal'; | ||
|  | import { EditProfileDialog } from './EditProfileDialog'; | ||
|  | import { OnionPathModal } from './OnionStatusPathDialog'; | ||
|  | import { UserDetailsDialog } from './UserDetailsDialog'; | ||
| 
											4 years ago
										 | import { SessionConfirm } from './SessionConfirm'; | ||
| 
											4 years ago
										 | import { SessionPasswordDialog } from './SessionPasswordDialog'; | ||
| 
											4 years ago
										 | import { SessionSeedModal } from './SessionSeedModal'; | ||
| 
											4 years ago
										 | import { AddModeratorsDialog } from './ModeratorsAddDialog'; | ||
|  | import { RemoveModeratorsDialog } from './ModeratorsRemoveDialog'; | ||
|  | import { UpdateGroupMembersDialog } from './UpdateGroupMembersDialog'; | ||
|  | import { UpdateGroupNameDialog } from './UpdateGroupNameDialog'; | ||
|  | import { SessionNicknameDialog } from './SessionNicknameDialog'; | ||
| 
											4 years ago
										 | 
 | ||
|  | export const ModalContainer = () => { | ||
|  |   const confirmModalState = useSelector(getConfirmModal); | ||
|  |   const inviteModalState = useSelector(getInviteContactModal); | ||
|  |   const addModeratorsModalState = useSelector(getAddModeratorsModal); | ||
|  |   const removeModeratorsModalState = useSelector(getRemoveModeratorsModal); | ||
|  |   const updateGroupMembersModalState = useSelector(getUpdateGroupMembersModal); | ||
|  |   const updateGroupNameModalState = useSelector(getUpdateGroupNameModal); | ||
|  |   const userDetailsModalState = useSelector(getUserDetailsModal); | ||
|  |   const changeNicknameModal = useSelector(getChangeNickNameDialog); | ||
|  |   const editProfileModalState = useSelector(getEditProfileDialog); | ||
|  |   const onionPathModalState = useSelector(getOnionPathDialog); | ||
|  |   const recoveryPhraseModalState = useSelector(getRecoveryPhraseDialog); | ||
|  |   const adminLeaveClosedGroupModalState = useSelector(getAdminLeaveClosedGroupDialog); | ||
|  |   const sessionPasswordModalState = useSelector(getSessionPasswordDialog); | ||
| 
											4 years ago
										 |   const deleteAccountModalState = useSelector(getDeleteAccountModalState); | ||
| 
											4 years ago
										 | 
 | ||
|  |   return ( | ||
|  |     <> | ||
|  |       {confirmModalState && <SessionConfirm {...confirmModalState} />} | ||
|  |       {inviteModalState && <InviteContactsDialog {...inviteModalState} />} | ||
|  |       {addModeratorsModalState && <AddModeratorsDialog {...addModeratorsModalState} />} | ||
|  |       {removeModeratorsModalState && <RemoveModeratorsDialog {...removeModeratorsModalState} />} | ||
|  |       {updateGroupMembersModalState && ( | ||
|  |         <UpdateGroupMembersDialog {...updateGroupMembersModalState} /> | ||
|  |       )} | ||
|  |       {updateGroupNameModalState && <UpdateGroupNameDialog {...updateGroupNameModalState} />} | ||
|  |       {userDetailsModalState && <UserDetailsDialog {...userDetailsModalState} />} | ||
|  |       {changeNicknameModal && <SessionNicknameDialog {...changeNicknameModal} />} | ||
|  |       {editProfileModalState && <EditProfileDialog {...editProfileModalState} />} | ||
|  |       {onionPathModalState && <OnionPathModal {...onionPathModalState} />} | ||
|  |       {recoveryPhraseModalState && <SessionSeedModal {...recoveryPhraseModalState} />} | ||
|  |       {adminLeaveClosedGroupModalState && ( | ||
|  |         <AdminLeaveClosedGroupDialog {...adminLeaveClosedGroupModalState} /> | ||
|  |       )} | ||
| 
											4 years ago
										 |       {sessionPasswordModalState && <SessionPasswordDialog {...sessionPasswordModalState} />} | ||
| 
											4 years ago
										 |       {deleteAccountModalState && <DeleteAccountModal {...deleteAccountModalState} />} | ||
| 
											4 years ago
										 |     </> | ||
|  |   ); | ||
|  | }; |