From eccddb11546862a471a9af6038031e7df6181c9a Mon Sep 17 00:00:00 2001 From: Johnny Date: Sun, 7 Jul 2024 23:09:48 +0800 Subject: [PATCH] chore: add create time to memo detail sidebar (#3657) --- .../MemoDetailSidebar/MemoDetailSidebar.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx b/web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx index 768d3739..3c860fb7 100644 --- a/web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx +++ b/web/src/components/MemoDetailSidebar/MemoDetailSidebar.tsx @@ -1,4 +1,5 @@ import clsx from "clsx"; +import { isEqual } from "lodash-es"; import { Memo } from "@/types/proto/api/v1/memo_service"; import { useTranslate } from "@/utils/i18n"; import Icon from "../Icon"; @@ -22,8 +23,22 @@ const MemoDetailSidebar = ({ memo, className }: Props) => { className, )} > -
-
+
+
+

+ Created at +

+

{memo.createTime?.toLocaleString()}

+
+ {!isEqual(memo.createTime, memo.updateTime) && ( +
+

+ Last updated at +

+

{memo.updateTime?.toLocaleString()}

+
+ )} +
{t("common.tags")} {memo.property.tags.length > 0 && ({memo.property.tags.length})}