This commit is contained in:
2025-06-29 05:35:52 +09:00
parent d403b3aa89
commit 01b45c1a8d
+4 -3
View File
@@ -34,13 +34,14 @@ export default () => {
})) }))
setWikiPage (null) setWikiPage (null)
if (!(tags.length)) if (tags.length === 1)
return {
void (axios.get (`${ API_BASE_URL }/wiki/title/${ encodeURIComponent (tags.join (' ')) }`) void (axios.get (`${ API_BASE_URL }/wiki/title/${ encodeURIComponent (tags[0]) }`)
.then (res => setWikiPage (toCamel (res.data, { deep: true }))) .then (res => setWikiPage (toCamel (res.data, { deep: true })))
.catch (() => { .catch (() => {
; ;
})) }))
}
}, [location.search]) }, [location.search])
return ( return (