Put back numbers in home tab titles for categories / following

This commit is contained in:
James Grugett 2022-06-08 11:24:35 -05:00
parent 61d7f0eca0
commit 323a62f041
2 changed files with 8 additions and 7 deletions

View File

@ -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 && (
<Row className="items-center gap-1 text-gray-500">
<div>{categoriesDescription}</div>
@ -280,7 +285,7 @@ function CategoryFollowSelector(props: {
...(user
? [
{
title: 'Following',
title: followingTitle,
content: (
<Row className="items-center gap-2 text-gray-500">
<div>Showing markets by users you are following.</div>

View File

@ -54,11 +54,7 @@ export function EditFollowingButton(props: { user: User; className?: string }) {
onClick={() => setOpen(true)}
>
<PencilIcon className="inline h-4 w-4" />
<div>
<span className="font-semibold">{followingIds?.length ?? ''}</span>{' '}
Following
</div>
Following
<FollowingFollowersDialog
user={user}
defaultTab="following"