Browse Source

#102 サイドバーの投稿詳細,形だけ

#102
みてるぞ 5 days ago
parent
commit
7729e4b1f6
1 changed files with 18 additions and 2 deletions
  1. +18
    -2
      frontend/src/components/TagDetailSidebar.tsx

+ 18
- 2
frontend/src/components/TagDetailSidebar.tsx View File

@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react'

import TagLink from '@/components/TagLink'
import TagSearch from '@/components/TagSearch'
import SectionTitle from '@/components/common/SectionTitle'
import SubsectionTitle from '@/components/common/SubsectionTitle'
import SidebarComponent from '@/components/layout/SidebarComponent'
import { CATEGORIES } from '@/consts'
@@ -53,11 +54,26 @@ export default (({ post }: Props) => {
<div className="my-3" key={cat}>
<SubsectionTitle>{categoryNames[cat]}</SubsectionTitle>
<ul>
{tags[cat].map ((tag, i) => (
<li key={i} className="mb-1">
{tags[cat].map (tag => (
<li key={tag.id} className="mb-1">
<TagLink tag={tag}/>
</li>))}
</ul>
</div>))}
{post && (
<div>
<SectionTitle>情報</SectionTitle>
<ul>
<li>Id.: {post.id}</li>
{/* <li>耕作者: {post.createdBy}</li> */}
<li>耕作日時: {post.createdAt}</li>
<li>
リンク:
<a href={post.url} target="_blank">
{post.url}
</a>
</li>
</ul>
</div>)}
</SidebarComponent>)
}) satisfies FC<Props>

Loading…
Cancel
Save