このコミットが含まれているのは:
2026-02-04 23:08:28 +09:00
コミット 57f28e4e5e
16個のファイルの変更74行の追加132行の削除
+2 -5
ファイルの表示
@@ -1,5 +1,3 @@
import axios from 'axios'
import toCamel from 'camelcase-keys'
import { useEffect, useMemo, useState } from 'react'
import ReactMarkdown from 'react-markdown'
import remarkGFM from 'remark-gfm'
@@ -7,7 +5,7 @@ import remarkGFM from 'remark-gfm'
import PrefetchLink from '@/components/PrefetchLink'
import SectionTitle from '@/components/common/SectionTitle'
import SubsectionTitle from '@/components/common/SubsectionTitle'
import { API_BASE_URL } from '@/config'
import { apiGet } from '@/lib/api'
import remarkWikiAutoLink from '@/lib/remark-wiki-autolink'
import type { FC } from 'react'
@@ -43,8 +41,7 @@ export default (({ title, body }: Props) => {
void (async () => {
try
{
const res = await axios.get (`${ API_BASE_URL }/wiki`)
const data: WikiPage[] = toCamel (res.data as any, { deep: true })
const data = await apiGet<WikiPage[]> ('/wiki')
setPageNames (data.map (page => page.title).sort ((a, b) => b.length - a.length))
}
catch