This commit is contained in:
2025-07-19 23:26:18 +09:00
parent 196d673324
commit 1a965146dc
6 changed files with 43 additions and 36 deletions
+9 -4
View File
@@ -24,8 +24,8 @@ type Props = { user: User | null }
export default ({ user }: Props) => {
const { id } = useParams ()
const [post, setPost] = useState<Post | null> (null)
const [editing, setEditing] = useState (true)
const [post, setPost] = useState<Post | null> (null)
const [status, setStatus] = useState (200)
const changeViewedFlg = async () => {
@@ -92,13 +92,15 @@ export default ({ user }: Props) => {
: 'bg-gray-500 hover:bg-gray-600')
return (
<>
<div className="md:flex md:flex-1">
<Helmet>
{(post?.thumbnail || post?.thumbnailBase) && (
<meta name="thumbnail" content={post.thumbnail || post.thumbnailBase} />)}
{post && <title>{`${ post.title || post.url } | ${ SITE_TITLE }`}</title>}
</Helmet>
<TagDetailSidebar post={post} />
<div className="hidden md:block">
<TagDetailSidebar post={post} />
</div>
<MainArea>
{post
? (
@@ -126,5 +128,8 @@ export default ({ user }: Props) => {
</>)
: 'Loading...'}
</MainArea>
</>)
<div className="md:hidden">
<TagDetailSidebar post={post} />
</div>
</div>)
}