Skip to content

Commit

Permalink
feat: enhancement on UI/UX on user statistic view part. (#4122)
Browse files Browse the repository at this point in the history
Enhancement on UI/UX on user statistic view part.
  • Loading branch information
Yucheng-An authored Nov 17, 2024
1 parent f00751a commit f6af564
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/src/components/UserStatisticsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ const UserStatisticsView = () => {
data={activityStats}
onClick={onCalendarClick}
/>
{memoAmount > 0 && (
{memoAmount === 0 ? (
<p className="mt-1 w-full text-xs italic opacity-80">No memos</p>
) : memoAmount === 1 ? (
<p className="mt-1 w-full text-xs italic opacity-80">
<span>{memoAmount}</span> memo in <span>{days}</span> {days > 1 ? "days" : "day"}
</p>
) : (
<p className="mt-1 w-full text-xs italic opacity-80">
<span>{memoAmount}</span> memos in <span>{days}</span> {days > 1 ? "days" : "day"}
</p>
Expand Down

0 comments on commit f6af564

Please sign in to comment.