This commit is contained in:
2025-08-23 18:01:23 +09:00
parent d5ff17074f
commit e79688783e
28 changed files with 126 additions and 131 deletions
+8 -8
View File
@@ -72,9 +72,9 @@ export default ({ user }: Props) => {
switch (status)
{
case 404:
return <NotFound />
return <NotFound/>
case 503:
return <ServiceUnavailable />
return <ServiceUnavailable/>
}
const url = post ? new URL (post.url) : null
@@ -89,11 +89,11 @@ export default ({ user }: Props) => {
<div className="md:flex md:flex-1">
<Helmet>
{(post?.thumbnail || post?.thumbnailBase) && (
<meta name="thumbnail" content={post.thumbnail || post.thumbnailBase} />)}
<meta name="thumbnail" content={post.thumbnail || post.thumbnailBase}/>)}
{post && <title>{`${ post.title || post.url } | ${ SITE_TITLE }`}</title>}
</Helmet>
<div className="hidden md:block">
<TagDetailSidebar post={post} />
<TagDetailSidebar post={post}/>
</div>
<MainArea>
{post
@@ -103,8 +103,8 @@ export default ({ user }: Props) => {
? (
<NicoViewer id={videoId}
width={640}
height={360} />)
: <img src={post.thumbnail} alt={post.url} className="mb-4 w-full" />}
height={360}/>)
: <img src={post.thumbnail} alt={post.url} className="mb-4 w-full"/>}
<Button onClick={changeViewedFlg}
className={cn ('text-white', viewedClass)}>
{post.viewed ? '閲覧済' : '未閲覧'}
@@ -121,14 +121,14 @@ export default ({ user }: Props) => {
onSave={newPost => {
setPost (newPost)
toast ({ description: '更新しました.' })
}} />
}}/>
</Tab>)}
</TabGroup>
</>)
: 'Loading...'}
</MainArea>
<div className="md:hidden">
<TagDetailSidebar post={post} />
<TagDetailSidebar post={post}/>
</div>
</div>)
}