From 802f37604285ba231a51ec06bdcf70782af72236 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Sat, 18 Dec 2021 02:28:01 -0800 Subject: [PATCH] Add a message for empty markets and bets --- web/components/bets-list.tsx | 11 ++++++++++- web/components/contracts-list.tsx | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 23b4aac3..40237a44 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -45,7 +45,16 @@ export function BetsList(props: { user: User }) { } if (bets.length === 0) - return
You have not made any bets yet!
+ return ( +
+ You have not made any bets yet.{' '} + + + Find a prediction market! + + +
+ ) // Decending creation time. bets.sort((bet1, bet2) => bet2.createdTime - bet1.createdTime) diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx index 05762267..6514f098 100644 --- a/web/components/contracts-list.tsx +++ b/web/components/contracts-list.tsx @@ -86,6 +86,20 @@ function ContractsGrid(props: { contracts: Contract[] }) { ) const contracts = [...activeContracts, ...resolvedContracts] + if (contracts.length === 0) { + return ( +

+ No markets found. Would you like to{' '} + + + create one + + + ? +

+ ) + } + return (