// @flow import * as React from 'react'; import { UserHoverProfile } from 'src/components/hoverProfile'; import { Container, MetaContainer, TextRow, MetaTitle, MetaSubtitle, Divider, MetaSubtitleText, MetaSubtitleLocked, MetaSubtitleWatercooler, MetaSubtitlePinned, } from './style'; import Timestamp from './timestamp'; import type { HeaderProps } from './index'; class Header extends React.Component { render() { const { active, viewContext, thread: { community, channel, id, watercooler, isLocked, author }, } = this.props; const isPinned = id === community.pinnedThreadId; return ( {community.name} · {viewContext === 'userProfileReplies' && ( {author.user.username ? ( By {author.user.name} ) : ( By {author.user.name} )} · )} # {channel.name} {watercooler && ( · Watercooler )} {isLocked && ( · Locked )} {isPinned && ( · Pinned )} ); } } export default Header;