このコミットが含まれているのは:
2026-02-04 23:08:28 +09:00
コミット 57f28e4e5e
16個のファイルの変更74行の追加132行の削除
+3 -5
ファイルの表示
@@ -1,12 +1,11 @@
import axios from 'axios'
import toCamel from 'camelcase-keys'
import { useEffect, useState } from 'react'
import { Helmet } from 'react-helmet-async'
import { useLocation, useParams } from 'react-router-dom'
import PageTitle from '@/components/common/PageTitle'
import MainArea from '@/components/layout/MainArea'
import { API_BASE_URL, SITE_TITLE } from '@/config'
import { SITE_TITLE } from '@/config'
import { apiGet } from '@/lib/api'
import { cn } from '@/lib/utils'
import type { WikiPageDiff } from '@/types'
@@ -25,8 +24,7 @@ export default () => {
useEffect (() => {
void (async () => {
const res = await axios.get (`${ API_BASE_URL }/wiki/${ id }/diff`, { params: { from, to } })
setDiff (toCamel (res.data as any, { deep: true }) as WikiPageDiff)
setDiff (await apiGet<WikiPageDiff> (`/wiki/${ id }/diff`, { params: { from, to } }))
}) ()
}, [])