From 11bd658c68551504fcf99e8998c408487cd6db9d Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sun, 2 Oct 2022 16:47:46 -0500 Subject: [PATCH] hide comment sort, trade tab if no items --- web/components/contract/contract-tabs.tsx | 38 ++++++++++++----------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/web/components/contract/contract-tabs.tsx b/web/components/contract/contract-tabs.tsx index 1a67d86a..bf18fdbe 100644 --- a/web/components/contract/contract-tabs.tsx +++ b/web/components/contract/contract-tabs.tsx @@ -53,7 +53,7 @@ export function ContractTabs(props: { title: 'Comments', content: , }, - { + bets.length > 0 && { title: capitalize(PAST_BETS), content: , }, @@ -150,25 +150,27 @@ const CommentsTabContent = memo(function CommentsTabContent(props: { <> - - + + Sort by: {sort} + + - - + + + )} {topLevelComments.map((parent) => (