Put back numbers in home tab titles for categories / following
This commit is contained in:
parent
61d7f0eca0
commit
323a62f041
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
<FollowingFollowersDialog
|
||||
user={user}
|
||||
defaultTab="following"
|
||||
|
|
Loading…
Reference in New Issue
Block a user