import { Comment } from '../../common/comment' import { Contract } from '../../common/contract' import { contractPath } from '../lib/firebase/contracts' import { SiteLink } from './site-link' import { Row } from './layout/row' import { Avatar } from './avatar' import { RelativeTimestamp } from './relative-timestamp' import { UserLink } from './user-page' import { User } from '../../common/user' import _, { Dictionary } from 'lodash' import { Col } from './layout/col' export function UserCommentsList(props: { user: User commentsByContractId: Dictionary uniqueContracts: (Contract | undefined)[] }) { const { commentsByContractId, uniqueContracts } = props return ( {uniqueContracts.map( (contract) => contract && (
{contract ? contract.question : '...'}
{commentsByContractId[contract.id].map((comment) => (
))}
) )} ) } function ProfileComment(props: { comment: Comment }) { const { comment } = props const { text, userUsername, userName, userAvatarUrl, createdTime } = comment // TODO: find and attach relevant bets by comment betId at some point return (

{' '}

{text}
) }