This commit is contained in:
2025-08-23 18:40:03 +09:00
parent e79688783e
commit 7e2d94fdc0
15 changed files with 80 additions and 57 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ import SectionTitle from '@/components/common/SectionTitle'
import SubsectionTitle from '@/components/common/SubsectionTitle'
import { API_BASE_URL } from '@/config'
import type { FC } from 'react'
import type { Components } from 'react-markdown'
import type { WikiPage } from '@/types'
@@ -31,7 +32,7 @@ const mdComponents = { h1: ({ children }) => <SectionTitle>{children}</SectionT
</a>))) } as const satisfies Components
export default ({ title, body }: Props) => {
export default (({ title, body }: Props) => {
const [pageNames, setPageNames] = useState<string[]> ([])
const [realBody, setRealBody] = useState<string> ('')
@@ -101,4 +102,4 @@ export default ({ title, body }: Props) => {
<ReactMarkdown components={mdComponents} remarkPlugins={[remarkGFM]}>
{realBody || `このページは存在しません。[新規作成してください](/wiki/new?title=${ encodeURIComponent (title) })。`}
</ReactMarkdown>)
}
}) satisfies FC<Props>