Skip to content

Commit

Permalink
chore: update memo detail header
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack committed Sep 24, 2022
1 parent dc3052e commit e171fbc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions web/src/pages/MemoDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ const MemoDetail = () => {
<div className="memo-container">
<div className="memo-header">
<span className="time-text">{dayjs(state.memo.createdTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss")}</span>
<span className="split-text">by</span>
<a className="name-text" href={`/u/${state.memo.creator.id}`}>
{state.memo.creator.name}
</a>
{user?.id === state.memo.creatorId && (
{user?.id === state.memo.creatorId ? (
<Dropdown
className="visibility-selector"
trigger={
Expand All @@ -120,6 +116,13 @@ const MemoDetail = () => {
}
actionsClassName="!w-28 !left-0 !p-1"
/>
) : (
<>
<span className="split-text">by</span>
<a className="name-text" href={`/u/${state.memo.creator.id}`}>
{state.memo.creator.name}
</a>
</>
)}
</div>
<MemoContent className="memo-content" content={state.memo.content} onMemoContentClick={() => undefined} />
Expand Down

0 comments on commit e171fbc

Please sign in to comment.