From fc95876617bef4544f280885c11182c1c468401b Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 9 Apr 2024 09:05:34 +0800 Subject: [PATCH] chore: update memo creator display --- web/src/components/MemoView.tsx | 7 ++++++- web/src/pages/Explore.tsx | 2 +- web/src/pages/MemoDetail.tsx | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsx index cb6f57ba..008c4ec5 100644 --- a/web/src/components/MemoView.tsx +++ b/web/src/components/MemoView.tsx @@ -24,6 +24,7 @@ import VisibilityIcon from "./VisibilityIcon"; interface Props { memo: Memo; compact?: boolean; + showCreator?: boolean; showVisibility?: boolean; showPinned?: boolean; className?: string; @@ -85,7 +86,7 @@ const MemoView: React.FC = (props: Props) => { >
- {creator && ( + {props.showCreator && creator ? (
@@ -106,6 +107,10 @@ const MemoView: React.FC = (props: Props) => {
+ ) : ( +
+ +
)}
diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx index fa945a86..f5cea64d 100644 --- a/web/src/pages/Explore.tsx +++ b/web/src/pages/Explore.tsx @@ -66,7 +66,7 @@ const Explore = () => {
{sortedMemos.map((memo) => ( - + ))} {isRequesting ? (
diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index 695dd34d..e5c4014a 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -86,6 +86,7 @@ const MemoDetail = () => { className="shadow hover:shadow-xl transition-all" memo={memo} compact={false} + showCreator showVisibility showPinned /> @@ -107,7 +108,7 @@ const MemoDetail = () => { ({comments.length})
{comments.map((comment) => ( - + ))} )}