1 import { useAllowAddressDeletion } from '@proton/account/allowAddressDeletion/hooks';
2 import { useUser } from '@proton/account/user/hooks';
3 import type { Organization } from '@proton/shared/lib/interfaces';
5 import AddressesWithMembers from './AddressesWithMembers';
6 import AddressesWithUser from './AddressesWithUser';
8 interface AddressesProps {
10 organization?: Organization;
12 hasDescription?: boolean;
15 const Addresses = ({ isOnlySelf, organization, memberID, hasDescription }: AddressesProps) => {
16 const [user] = useUser();
17 const [allowAddressDeletion] = useAllowAddressDeletion();
19 return user.isAdmin && user.hasPaidMail ? (
21 isOnlySelf={isOnlySelf}
24 organization={organization}
25 allowAddressDeletion={allowAddressDeletion ?? false}
26 hasDescription={hasDescription}
31 allowAddressDeletion={allowAddressDeletion ?? false}
32 hasDescription={hasDescription}
37 export default Addresses;