#52 完了
This commit is contained in:
@@ -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 }`}>
|
||||
|
||||
Reference in New Issue
Block a user