Linkify bettor username in Bets tab
This commit is contained in:
parent
3858f8fbea
commit
2564eb9c26
|
@ -26,7 +26,7 @@ export function Avatar(props: {
|
||||||
return avatarUrl ? (
|
return avatarUrl ? (
|
||||||
<img
|
<img
|
||||||
className={clsx(
|
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}`,
|
`w-${s} h-${s}`,
|
||||||
!noLink && 'cursor-pointer',
|
!noLink && 'cursor-pointer',
|
||||||
className
|
className
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { RelativeTimestamp } from 'web/components/relative-timestamp'
|
||||||
import React, { Fragment } from 'react'
|
import React, { Fragment } from 'react'
|
||||||
import { uniqBy, partition, sumBy, groupBy } from 'lodash'
|
import { uniqBy, partition, sumBy, groupBy } from 'lodash'
|
||||||
import { JoinSpans } from 'web/components/join-spans'
|
import { JoinSpans } from 'web/components/join-spans'
|
||||||
|
import { UserLink } from '../user-page'
|
||||||
|
|
||||||
export function FeedBet(props: {
|
export function FeedBet(props: {
|
||||||
contract: Contract
|
contract: Contract
|
||||||
|
@ -83,8 +84,12 @@ export function BetStatusText(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="text-sm text-gray-500">
|
<div className="text-sm text-gray-500">
|
||||||
<span>{isSelf ? 'You' : bettor ? bettor.name : 'A trader'}</span> {bought}{' '}
|
{bettor ? (
|
||||||
{money}
|
<UserLink name={bettor.name} username={bettor.username} />
|
||||||
|
) : (
|
||||||
|
<span>{isSelf ? 'You' : 'A trader'}</span>
|
||||||
|
)}{' '}
|
||||||
|
{bought} {money}
|
||||||
{!hideOutcome && (
|
{!hideOutcome && (
|
||||||
<>
|
<>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user