// Package imports. import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage, defineMessages, } from 'react-intl'; // Components. import Avatar from 'flavours/glitch/components/avatar'; import Permalink from 'flavours/glitch/components/permalink'; // Utils. import { hiddenComponent } from 'flavours/glitch/util/react_helpers'; import { profileLink } from 'flavours/glitch/util/backend_links'; // Messages. const messages = defineMessages({ edit: { defaultMessage: 'Edit profile', id: 'navigation_bar.edit_profile', }, }); // The component. export default function DrawerAccount ({ account }) { // We need an account to render. if (!account) { return (
{ profileLink !== undefined && ( )}
); } // The result. return (
{account.get('acct')} @{account.get('acct')} { profileLink !== undefined && ( )}
); } // Props. DrawerAccount.propTypes = { account: ImmutablePropTypes.map };