import React from 'react'; import clsx from 'clsx'; import { Link } from 'react-router-dom'; import { Spinner } from 'reactstrap'; import { TimelineInfo } from '../data/timeline'; import TimelineLogo from '../common/TimelineLogo'; import UserTimelineLogo from '../common/UserTimelineLogo'; export interface TimelineBoardProps { title?: string; timelines?: TimelineInfo[]; className?: string; } const TimelineBoard: React.FC = props => { const { title, timelines, className } = props; return (
{title != null &&

{title}

} {(() => { if (timelines == null) { return (
); } else { return timelines.map(timeline => { const { name } = timeline; const isPersonal = name.startsWith('@'); const url = isPersonal ? `/users/${timeline.owner.username}` : `/timelines/${name}`; return (
{isPersonal ? ( ) : ( )} {name}
); }); } })()}
); }; export default TimelineBoard;