From 323a62f04126c59d620b8d70b66c27e7d86e7577 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 8 Jun 2022 11:24:35 -0500 Subject: [PATCH] Put back numbers in home tab titles for categories / following --- web/components/contract-search.tsx | 9 +++++++-- web/components/following-button.tsx | 6 +----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index fa22e0ef..e56be8b8 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -250,8 +250,13 @@ function CategoryFollowSelector(props: { const user = useUser() + const categoriesTitle = `${ + followedCategories?.length ? followedCategories.length : 'All' + } Categories` let categoriesDescription = `Showing all categories` + const followingTitle = `${follows?.length ? follows.length : 'All'} Following` + if (followedCategories.length) { const categoriesLabel = followedCategories .slice(0, 3) @@ -269,7 +274,7 @@ function CategoryFollowSelector(props: { defaultIndex={mode === 'categories' ? 0 : 1} tabs={[ { - title: 'Categories', + title: categoriesTitle, content: user && (
{categoriesDescription}
@@ -280,7 +285,7 @@ function CategoryFollowSelector(props: { ...(user ? [ { - title: 'Following', + title: followingTitle, content: (
Showing markets by users you are following.
diff --git a/web/components/following-button.tsx b/web/components/following-button.tsx index 32b1edf1..f880d127 100644 --- a/web/components/following-button.tsx +++ b/web/components/following-button.tsx @@ -54,11 +54,7 @@ export function EditFollowingButton(props: { user: User; className?: string }) { onClick={() => setOpen(true)} > -
- {followingIds?.length ?? ''}{' '} - Following -
- + Following