From 9cb24c9f3c1a1155f0d1157392fd683189392c3b Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 31 May 2022 21:23:36 -0500 Subject: [PATCH] Make categories work when signed out --- web/components/contract-search.tsx | 1 - web/components/feed/category-selector.tsx | 10 +++------- web/pages/activity.tsx | 6 +----- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index acddaa6e..65a70d8e 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -115,7 +115,6 @@ export function ContractSearch(props: { {showCategorySelector && ( diff --git a/web/components/feed/category-selector.tsx b/web/components/feed/category-selector.tsx index bb89da81..7c014a0e 100644 --- a/web/components/feed/category-selector.tsx +++ b/web/components/feed/category-selector.tsx @@ -1,16 +1,14 @@ import clsx from 'clsx' -import { User } from '../../../common/user' import { Row } from '../layout/row' import { CATEGORIES, CATEGORY_LIST } from '../../../common/categories' export function CategorySelector(props: { - user: User | null | undefined category: string setCategory: (category: string) => void className?: string }) { - const { className, user, category, setCategory } = props + const { className, category, setCategory } = props return ( { - if (!user?.id) return + toggle={() => { setCategory('all') }} /> @@ -35,8 +32,7 @@ export function CategorySelector(props: { key={cat} category={CATEGORIES[cat].split(' ')[0]} isFollowed={cat === category} - toggle={async () => { - if (!user?.id) return + toggle={() => { setCategory(cat) }} /> diff --git a/web/pages/activity.tsx b/web/pages/activity.tsx index dd36ac39..b39191bc 100644 --- a/web/pages/activity.tsx +++ b/web/pages/activity.tsx @@ -39,11 +39,7 @@ export default function Activity() { <> - + {feed ? (