Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

feat: enhancement on UI/UX on user statistic view part. (#4122)

Andy Anf6af564d4e62
diff --git a/web/src/components/UserStatisticsView.tsx b/web/src/components/UserStatisticsView.tsx
index e35ecd299..4778ebcb4 100644
--- a/web/src/components/UserStatisticsView.tsx
+++ b/web/src/components/UserStatisticsView.tsx
@@ -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>