import * as React from "react"; import * as Constants from "~/common/constants"; import { css } from "@emotion/react"; import { ProcessedText } from "~/components/system/components/Typography"; import SlatePreviewBlock from "~/components/core/SlatePreviewBlock"; const STYLES_PROFILE = css` text-align: center; width: 100%; margin-top: 16px; `; const STYLES_PROFILE_IMAGE = css` background-color: ${Constants.system.foreground}; background-size: cover; background-position: 50% 50%; width: 152px; height: 152px; border-radius: 4px; margin: 0 auto; padding: 0; `; const STYLES_NAME = css` font-size: ${Constants.typescale.lvl3}; font-family: ${Constants.font.medium}; width: 100%; max-width: 420px; margin: 0 auto; padding: 0 24px 0 24px; overflow: hidden; text-overflow: ellipsis; `; const STYLES_DESCRIPTION = css` font-size: ${Constants.typescale.lvl1}; width: 100%; max-width: 800px; margin: 0 auto; padding: 0 24px 0 24px; word-wrap: break-word; `; const STYLES_LINK = css` color: ${Constants.system.black}; text-decoration: none; `; export default class Profile extends React.Component { render() { let data = this.props.creator ? this.props.creator : this.props.data; return (

{data.data.name || data.username}

{data.data.body ? (

) : null}
{this.props.buttons}
{data.slates && data.slates.length ? (
{data.slates.map((slate) => { if (this.props.onAction) { return (
this.props.onAction({ type: "NAVIGATE", value: this.props.sceneId, scene: "PUBLIC_SLATE", data: slate, }) } >
); } return ( ); })}
) : null}
); } }