import * as React from 'react' import { Avatar } from '@dcl/schemas/dist/platform/profile/avatar' import { Logo } from '../Logo/Logo' import { Popup } from '../Popup/Popup' import { AvatarFace } from '../AvatarFace/AvatarFace' import { Blockie } from '../Blockie/Blockie' import './Profile.css' export type ProfileProps = { address: string avatar?: Avatar | null textOnly?: boolean imageOnly?: boolean hasPopup?: boolean inline?: boolean size?: 'normal' | 'large' | 'huge' | 'massive' isDecentraland?: boolean } export class Profile extends React.PureComponent { static defaultProps = { inline: true, size: 'normal' } render(): React.ReactNode { const { address, avatar, textOnly, imageOnly, hasPopup, inline, size, isDecentraland } = this.props const name = (avatar && avatar.name) || address.slice(0, 6) if (isDecentraland) { return ( {imageOnly ? null : Decentraland} ) } if (textOnly) { return name } else { return ( {imageOnly ? null : {name}} ) : ( {imageOnly ? null : {name}} ) } /> ) } } }