Stop showing creator's trades in all cases

This commit is contained in:
Austin Chen 2022-03-16 19:37:43 -07:00
parent d4af15714c
commit 9426cc2b94
2 changed files with 2 additions and 13 deletions

View File

@ -85,7 +85,7 @@ const DAY_IN_MS = 24 * 60 * 60 * 1000
// - Within a day of the first in the group // - Within a day of the first in the group
// (Unless the bets are older: then are grouped by 7-days.) // (Unless the bets are older: then are grouped by 7-days.)
// - Do not have a comment // - Do not have a comment
// - Were not created by this user or the contract creator // - Were not created by this user
// Return a list of ActivityItems // Return a list of ActivityItems
function groupBets( function groupBets(
bets: Bet[], bets: Bet[],

View File

@ -178,7 +178,6 @@ function FeedBet(props: {
const { id, amount, outcome, createdTime, userId } = bet const { id, amount, outcome, createdTime, userId } = bet
const user = useUser() const user = useUser()
const isSelf = user?.id === userId const isSelf = user?.id === userId
const isCreator = contract.creatorId === userId
// You can comment if your bet was posted in the last hour // You can comment if your bet was posted in the last hour
const canComment = canAddComment(createdTime, isSelf) const canComment = canAddComment(createdTime, isSelf)
@ -202,13 +201,6 @@ function FeedBet(props: {
avatarUrl={user.avatarUrl} avatarUrl={user.avatarUrl}
username={user.username} username={user.username}
/> />
) : isCreator ? (
<Avatar
className={clsx(smallAvatar && 'ml-1')}
size={smallAvatar ? 'sm' : undefined}
avatarUrl={contract.creatorAvatarUrl}
username={contract.creatorUsername}
/>
) : ( ) : (
<div className="relative px-1"> <div className="relative px-1">
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-gray-200"> <div className="flex h-8 w-8 items-center justify-center rounded-full bg-gray-200">
@ -219,10 +211,7 @@ function FeedBet(props: {
</div> </div>
<div className={'min-w-0 flex-1 pb-1.5'}> <div className={'min-w-0 flex-1 pb-1.5'}>
<div className="text-sm text-gray-500"> <div className="text-sm text-gray-500">
<span> <span>{isSelf ? 'You' : 'A trader'}</span> {bought} {money}
{isSelf ? 'You' : isCreator ? contract.creatorName : 'A trader'}
</span>{' '}
{bought} {money}
{!hideOutcome && ( {!hideOutcome && (
<> <>
{' '} {' '}