This commit is contained in:
2025-06-28 15:46:38 +09:00
parent 3199c476a3
commit 934225f9e8
7 changed files with 115 additions and 36 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
import axios from 'axios'
import toCamel from 'camelcase-keys'
import { useEffect, useState } from 'react'
import { Helmet } from 'react-helmet'
import ReactMarkdown from 'react-markdown'
@@ -33,7 +34,7 @@ export default () => {
void (axios.get (`${ API_BASE_URL }/wiki/title/${ encodeURIComponent (title) }`, version && { params: { version } })
.then (res => {
setWikiPage (res.data)
setWikiPage (toCamel (res.data, { deep: true }))
WikiIdBus.set (res.data.id)
})
.catch (() => setWikiPage (null)))
@@ -51,7 +52,7 @@ export default () => {
<
</Link>) : <>()</>}
<span>{wikiPage.updated_at}</span>
<span>{wikiPage.updatedAt}</span>
{wikiPage.succ ? (
<Link to={`/wiki/${ title }?version=${ wikiPage.succ }`}>