/* @flow */ import React from 'react'; import { FormattedMessage } from 'react-intl'; import Badgeable from '../../components/badgeable/Badgeable'; import Tooltip from '../../components/tooltip/Tooltip'; import Avatar from '../../components/avatar'; import IconExpirationBadge from '../../icons/general/IconExpirationBadge'; import messages from './messages'; type Props = { allowBadging?: boolean, avatarUrl: ?string, expiration?: { executeAt: string, }, hasCustomAvatar: ?boolean, id: number, isExternalCollab?: boolean, name: string, }; const CollaboratorAvatarItem = (props: Props) => { const { allowBadging = false, expiration, isExternalCollab = false, hasCustomAvatar, avatarUrl, name, ...rest } = props; const avatarInstance = hasCustomAvatar && avatarUrl ? ( ) : ( ); const expirationBadge = allowBadging && expiration && expiration.executeAt ? ( } >
) : null; return {avatarInstance}; }; export default CollaboratorAvatarItem;