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