This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user