From 6d0ac3470acc89585a20e3383a31367e75a79fe5 Mon Sep 17 00:00:00 2001 From: Harsit Agarwalla Date: Mon, 2 Jan 2023 08:34:40 +0000 Subject: [PATCH 1/2] "Add Users Viewed Badge to the User Card in Popular Profile Page" --- components/user/UserCard.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/user/UserCard.js b/components/user/UserCard.js index a3408b4a62a..575322708b7 100644 --- a/components/user/UserCard.js +++ b/components/user/UserCard.js @@ -1,6 +1,6 @@ import Link from "next/link"; import ReactMarkdown from "react-markdown"; - +import { abbreviateNumber } from "js-abbreviation-number"; import FallbackImage from "../FallbackImage"; export default function UserCard({ profile }) { @@ -18,6 +18,16 @@ export default function UserCard({ profile }) { className="rounded-full" fallback={profile.name} /> + {profile.displayStatsPublic && ( +
+
+ {abbreviateNumber(profile.views)} +
+
+ )}

From 3c6cc25753b5741cf7282e1ec3c367e23a99f58d Mon Sep 17 00:00:00 2001 From: Harsit Agarwalla Date: Mon, 2 Jan 2023 08:37:48 +0000 Subject: [PATCH 2/2] Add Users Viewed Badge in User Card in Popular Profile Section --- components/user/UserCard.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/user/UserCard.js b/components/user/UserCard.js index 575322708b7..7f5fe4ebcf0 100644 --- a/components/user/UserCard.js +++ b/components/user/UserCard.js @@ -20,12 +20,12 @@ export default function UserCard({ profile }) { /> {profile.displayStatsPublic && (
-
- {abbreviateNumber(profile.views)} -
+
+ {abbreviateNumber(profile.views)} +
)}