From 749f7aad404a40553012dba8c267c06a9c530de9 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Thu, 2 Jun 2022 18:07:47 -0700 Subject: [PATCH] copyedit: username in bet list empty state --- web/components/bets-list.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index f4e5d419..506da013 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -101,7 +101,7 @@ export function BetsList(props: { user: User; hideBetsBefore?: number }) { return } - if (bets.length === 0) return + if (bets.length === 0) return // Decending creation time. bets.sort((bet1, bet2) => bet2.createdTime - bet1.createdTime) const contractBets = groupBy(bets, 'contractId') @@ -219,7 +219,7 @@ export function BetsList(props: { user: User; hideBetsBefore?: number }) { {displayedContracts.length === 0 ? ( - + ) : ( displayedContracts.map((contract) => ( { +const NoBets = ({ user }: { user: User }) => { + const me = useUser() return (
- You have not made any bets yet.{' '} - - Find a prediction market! - + {user.id === me?.id ? ( + <> + You have not made any bets yet.{' '} + + Find a prediction market! + + + ) : ( + <>{user.name} has not made any public bets yet. + )}
) }