1 import { c, msgid } from 'ttag';
3 import Icon from '@proton/components/components/icon/Icon';
4 import humanSize from '@proton/shared/lib/helpers/humanSize';
5 import type { Member, Organization } from '@proton/shared/lib/interfaces';
9 organization?: Organization;
12 const MemberFeatures = ({ member, organization }: Props) => {
13 const { UsedSpace, MaxSpace, MaxVPN } = member;
17 {(organization?.MaxSpace || 0) > 0 ? (
18 <span className="mb-2 flex flex-nowrap">
19 <span className="shrink-0 flex mt-0.5">
20 <Icon name="filing-cabinet" />
22 <span className="flex-1 pl-1" data-testid="users-and-addresses-table:storage">
23 {humanSize({ bytes: UsedSpace, unit: 'GB' })} / {humanSize({ bytes: MaxSpace, unit: 'GB' })}
27 {(organization?.MaxVPN || 0) > 0 ? (
28 <span className="flex flex-nowrap">
29 <span className="shrink-0 flex mt-0.5">
30 <Icon name="brand-proton-vpn" />
32 <span className="flex-1 pl-1" data-testid="users-and-addresses-table:vpnConnections">
33 {c('Feature').ngettext(msgid`${MaxVPN} VPN connection`, `${MaxVPN} VPN connections`, MaxVPN)}
41 export default MemberFeatures;