Linkify bettor username in Bets tab

This commit is contained in:
James Grugett 2022-06-09 15:00:31 -05:00
parent 3858f8fbea
commit 2564eb9c26
2 changed files with 8 additions and 3 deletions

View File

@ -26,7 +26,7 @@ export function Avatar(props: {
return avatarUrl ? (
<img
className={clsx(
'flex-shrink-0 rounded-full rounded-full bg-white object-cover',
'flex-shrink-0 rounded-full bg-white object-cover',
`w-${s} h-${s}`,
!noLink && 'cursor-pointer',
className

View File

@ -13,6 +13,7 @@ import { RelativeTimestamp } from 'web/components/relative-timestamp'
import React, { Fragment } from 'react'
import { uniqBy, partition, sumBy, groupBy } from 'lodash'
import { JoinSpans } from 'web/components/join-spans'
import { UserLink } from '../user-page'
export function FeedBet(props: {
contract: Contract
@ -83,8 +84,12 @@ export function BetStatusText(props: {
return (
<div className="text-sm text-gray-500">
<span>{isSelf ? 'You' : bettor ? bettor.name : 'A trader'}</span> {bought}{' '}
{money}
{bettor ? (
<UserLink name={bettor.name} username={bettor.username} />
) : (
<span>{isSelf ? 'You' : 'A trader'}</span>
)}{' '}
{bought} {money}
{!hideOutcome && (
<>
{' '}