diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index 8ea2d1bd..fa22e0ef 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -25,6 +25,7 @@ import { useFollows } from 'web/hooks/use-follows' import { EditCategoriesButton } from './feed/category-selector' import { CATEGORIES } from 'common/categories' import { Tabs } from './layout/tabs' +import { EditFollowingButton } from './following-button' const searchClient = algoliasearch( 'GJQPAYENIF', @@ -249,10 +250,6 @@ function CategoryFollowSelector(props: { const user = useUser() - const categoriesLabel = `Categories ${ - followedCategories.length ? followedCategories.length : '(All)' - }` - let categoriesDescription = `Showing all categories` if (followedCategories.length) { @@ -267,14 +264,12 @@ function CategoryFollowSelector(props: { categoriesDescription = `Showing ${categoriesLabel}${andMoreLabel}` } - const followingLabel = `Following ${follows.length}` - return (
{categoriesDescription}
@@ -285,11 +280,11 @@ function CategoryFollowSelector(props: { ...(user ? [ { - title: followingLabel, - + title: 'Following', content: ( - +
Showing markets by users you are following.
+
), }, diff --git a/web/components/feed/category-selector.tsx b/web/components/feed/category-selector.tsx index a9e6244a..4827186a 100644 --- a/web/components/feed/category-selector.tsx +++ b/web/components/feed/category-selector.tsx @@ -91,11 +91,12 @@ export function EditCategoriesButton(props: {
setIsOpen(true)} > + Categories setOpen(true)} + > + +
+ {followingIds?.length ?? ''}{' '} + Following +
+ + +
+ ) +} + export function FollowersButton(props: { user: User }) { const { user } = props const [isOpen, setIsOpen] = useState(false)