Browse Source

#102 サイドバーの投稿詳細

pull/131/head
みてるぞ 3 weeks ago
parent
commit
4dc8d071b7
1 changed files with 32 additions and 4 deletions
  1. +32
    -4
      frontend/src/components/TagDetailSidebar.tsx

+ 32
- 4
frontend/src/components/TagDetailSidebar.tsx View File

@@ -65,14 +65,42 @@ export default (({ post }: Props) => {
<SectionTitle>情報</SectionTitle>
<ul>
<li>Id.: {post.id}</li>
{/* <li>耕作者: {post.createdBy}</li> */}
<li>耕作日時: {post.createdAt}</li>
{/* TODO: uploadedUser の取得を対応したらコメント外す */}
{/*
<li>
リンク:
<a href={post.url} target="_blank">
<>耕作者: </>
{post.uploadedUser
? (
<Link to={`/users/${ post.uploadedUser.id }`}>
{post.uploadedUser.name || '名もなきニジラー'}
</Link>)
: 'bot操作'}
</li>
*/}
<li>耕作日時: {(new Date (post.createdAt)).toLocaleString ()}</li>
<li>
<>リンク: </>
<a
className="break-all"
href={post.url}
target="_blank"
rel="noopener noreferrer nofollow">
{post.url}
</a>
</li>
<li>
{/* TODO: 表示形式きしょすぎるので何とかする */}
<>オリジナルの投稿日時: </>
{!(post.originalCreatedFrom) && !(post.originalCreatedBefore)
? '不明'
: (
<>
{post.originalCreatedFrom
&& `${ (new Date (post.originalCreatedFrom)).toLocaleString () } 以降 `}
{post.originalCreatedBefore
&& `${ (new Date (post.originalCreatedBefore)).toLocaleString () } より前`}
</>)}
</li>
</ul>
</div>)}
</SidebarComponent>)


Loading…
Cancel
Save