import React from 'react'; import { fromUnixTime, format } from "date-fns"; import { Label, Accordion, Segment, Grid, Header, Image, Message, Icon, Button, Table } from 'semantic-ui-react' class RoomReport extends React.Component { constructor(props) { super(props); } async componentDidMount() { } render() { if (!this.props.report) { return
; } let reporterAccount = (
); let roomCreatorAccount = (
); let reporterAccountLink = (
Account missing!
); if (this.props.report.reporterAccount) { reporterAccountLink = ( {this.props.report.reporterAccount.username} ); } if (this.props.report.roomCreatorAccount) { roomCreatorAccount = ( Room Creator Account
{this.props.report.roomCreatorAccount.username}
) } const roomSnapshot = this.props.report.roomSnapshot; const roomTitle = ( {roomSnapshot.name}  {false && ((roomSnapshot.visibility === 'private') && )} {false && ((roomSnapshot.participants > 0) ? : )} ); return (
{format(fromUnixTime(this.props.report.createdAt._seconds), "PPPpp")} Room "{this.props.report.roomName}" was reported by {reporterAccountLink}
Reason {this.props.report.reason} Room {roomTitle} Reporter {reporterAccountLink}
{roomCreatorAccount} Room Name {roomSnapshot.name} Room Description {roomSnapshot.description} Room Category {roomSnapshot.category}
) } } export default RoomReport;