This commit is contained in:
2025-06-29 22:27:28 +09:00
parent 281c85f2f6
commit 068d0aed14
4 changed files with 94 additions and 32 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
import axios from 'axios'
import toCamel from 'camelcase-keys'
import React, { useEffect, useState } from 'react'
import { Helmet } from 'react-helmet'
import { Link } from 'react-router-dom'
@@ -17,7 +18,7 @@ export default () => {
const search = () => {
void (axios.get (`${ API_BASE_URL }/wiki/search`, { params: { title } })
.then (res => setResults (res.data)))
.then (res => setResults (toCamel (res.data, { deep: true }))))
}
const handleSearch = (e: React.FormEvent) => {
@@ -82,7 +83,7 @@ export default () => {
</Link>
</td>
<td className="p-2 text-gray-100 text-sm">
{page.updated_at}
{page.updatedAt}
</td>
</tr>))}
</tbody>