/* jshint ignore:start */ import React from 'react'; import { BottomDetails, TopDetails } from './details'; import { Options } from './options'; export default function(props) { const { activeCategory, categories, list, thread, isBusy, isSelected, showOptions, } = props; let category = null; if (activeCategory.id !== thread.category) { category = categories[thread.category]; } let className = 'thread-main col-xs-12'; if (showOptions) { if (thread.moderation.length) { className += ' col-sm-9 col-md-7'; } else { className += ' col-sm-10 col-md-7'; } } else { className += ' col-sm-12 col-md-9'; } return (
  • {thread.title}
  • ); } export function getClassName(isRead, isBusy, isSelected) { let styles = ['list-group-item']; if (isRead) { styles.push('thread-read'); } else { styles.push('thread-new'); } if (isBusy) { styles.push('thread-busy'); } else if (isSelected) { styles.push('thread-selected'); } return styles.join(' '); } export function Timestamp({ datetime, url }) { return ( {datetime.fromNow(true)} ); } export function LastPoster(props) { const { posterName, url } = props; if (url) { return ( {posterName} ); } return ( {posterName} ); }