ニジラー詳細ページ作成 (#63) (#341)

#63

#63

#63

#63

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #341
This commit was merged in pull request #341.
This commit is contained in:
2026-05-04 03:37:12 +09:00
parent dceed1caa1
commit 52aa1615b6
12 changed files with 494 additions and 42 deletions
+6 -5
View File
@@ -9,11 +9,12 @@ export const postsKeys = {
['posts', 'changes', p] as const }
export const tagsKeys = {
root: ['tags'] as const,
index: (p: FetchTagsParams) => ['tags', 'index', p] as const,
show: (name: string) => ['tags', name] as const,
changes: (p: { id?: string; page: number; limit: number }) =>
['tags', 'changes', p] as const }
root: ['tags'] as const,
index: (p: FetchTagsParams) => ['tags', 'index', p] as const,
show: (name: string) => ['tags', name] as const,
changes: (p: { id?: string; page: number; limit: number }) =>
['tags', 'changes', p] as const,
deerjikists: (id: string) => ['tags', 'deerjikists', id] as const }
export const wikiKeys = {
root: ['wiki'] as const,
+7 -1
View File
@@ -1,6 +1,6 @@
import { apiGet } from '@/lib/api'
import type { FetchTagsParams, Tag, TagVersion } from '@/types'
import type { Deerjikist, FetchTagsParams, Tag, TagVersion } from '@/types'
export const fetchTags = async (
@@ -56,3 +56,9 @@ export const fetchTagChanges = async (
versions: TagVersion[]
count: number }> =>
await apiGet ('/tags/versions', { params: { ...(id && { id }), page, limit } })
export const fetchDeerjikistsByTag = async (
id: string,
): Promise<{ tag: Tag; deerjikists: Deerjikist[]}> =>
await apiGet (`/tags/${ id }/deerjikists`)