feat: add counts to activity

This commit is contained in:
Kentai Radiquum 2025-04-04 05:29:36 +05:00
parent 339d4150b1
commit 2fce051a54
Signed by: Radiquum
GPG key ID: 858E8EE696525EED

View file

@ -66,13 +66,19 @@ export function ProfileActivity(props: {
color={tab == "comments" ? "blue" : "light"} color={tab == "comments" ? "blue" : "light"}
onClick={() => setTab("comments")} onClick={() => setTab("comments")}
> >
Комментарии Комментарии | {props.commentCount}
</Button> </Button>
<Button <Button
color={tab == "friends" ? "blue" : "light"} color={tab == "friends" ? "blue" : "light"}
onClick={() => setTab("friends")} onClick={() => setTab("friends")}
> >
Друзья Друзья | {props.friendsCount}
</Button>
<Button
color={tab == "videos" ? "blue" : "light"}
onClick={() => setTab("videos")}
>
Видео | {props.videoCount}
</Button> </Button>
</ButtonGroup> </ButtonGroup>
@ -84,38 +90,7 @@ export function ProfileActivity(props: {
)} )}
{tab == "comments" && <>comments</>} {tab == "comments" && <>comments</>}
{tab == "friends" && <>friends</>} {tab == "friends" && <>friends</>}
{tab == "videos" && <>videos</>}
{/* <div className="flex items-center gap-4 text-lg">
<div>
<p>
{props.commentCount}{" "}
{numberDeclension(
props.commentCount,
"комментарий",
"комментария",
"комментариев"
)}
</p>
<p className="mt-2">{props.videoCount} видео</p>
</div>
<div>
<Link href={`/profile/${props.profile_id}/collections`}>
<p className="border-b-2 border-gray-300 border-solid dark:border-gray-400 hover:border-gray-500 dark:hover:border-gray-200">
{props.collectionCount}{" "}
{numberDeclension(
props.commentCount,
"коллекция",
"коллекции",
"коллекций"
)}
</p>
</Link>
<p className="mt-2">
{props.friendsCount}{" "}
{numberDeclension(props.commentCount, "друзей", "друга", "друзей")}
</p>
</div>
</div> */}
</Card> </Card>
); );
} }