import React from 'react'; import { Link, RouteComponentProps } from 'react-router-dom'; import { LoginButton } from '../../components'; import './forum.scss'; interface Props extends RouteComponentProps {} interface State {} export class Forum extends React.Component { constructor(props: Props) { super(props); } componentDidMount() { } renderHeader() { return (
Forum Nav:
); } renderBody() { return (
{this.renderTable()}
); } renderCell(content: JSX.Element | string, style: any, center?: boolean, header?: boolean) { let classNames: string = ''; classNames += center && ' forum-cell--center'; classNames += header ? ' forum-cell--header' : ' forum-cell--body'; return
{content}
; } renderThreadRows() { return Array(40).fill('test 123').map((thread, index) => { return (
{this.renderCell(thread, { maxWidth: '50px' })} {this.renderCell(This is a test subject that could be really long, { minWidth: '200px' })} {this.renderCell(thread, { maxWidth: '150px' })} {this.renderCell(thread, { maxWidth: '150px' }, true)} {this.renderCell(thread, { maxWidth: '150px' }, true)} {this.renderCell(by thread, { maxWidth: '200px' })}
); }); } renderTable() { return (
Test
{this.renderCell(, { maxWidth: '50px' }, true, true)} {this.renderCell(Subject, { minWidth: '200px' }, false, true)} {this.renderCell(Author, { maxWidth: '150px' }, true, true)} {this.renderCell(Replies, { maxWidth: '150px' }, true, true)} {this.renderCell(Views, { maxWidth: '150px' }, true, true)} {this.renderCell(Last Post, { maxWidth: '200px' }, true, true)}
{this.renderThreadRows()}
); } render() { return (
{this.renderHeader()} {this.renderBody()}
); } }