Skip to content

Commit e171fbc

Browse files
committed
chore: update memo detail header
1 parent dc3052e commit e171fbc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

web/src/pages/MemoDetail.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,7 @@ const MemoDetail = () => {
9393
<div className="memo-container">
9494
<div className="memo-header">
9595
<span className="time-text">{dayjs(state.memo.createdTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss")}</span>
96-
<span className="split-text">by</span>
97-
<a className="name-text" href={`/u/${state.memo.creator.id}`}>
98-
{state.memo.creator.name}
99-
</a>
100-
{user?.id === state.memo.creatorId && (
96+
{user?.id === state.memo.creatorId ? (
10197
<Dropdown
10298
className="visibility-selector"
10399
trigger={
@@ -120,6 +116,13 @@ const MemoDetail = () => {
120116
}
121117
actionsClassName="!w-28 !left-0 !p-1"
122118
/>
119+
) : (
120+
<>
121+
<span className="split-text">by</span>
122+
<a className="name-text" href={`/u/${state.memo.creator.id}`}>
123+
{state.memo.creator.name}
124+
</a>
125+
</>
123126
)}
124127
</div>
125128
<MemoContent className="memo-content" content={state.memo.content} onMemoContentClick={() => undefined} />

0 commit comments

Comments
 (0)