履歴画面変更(#308) (#315)

Merge branch 'main' into feature/308

#308

#308

#308

#308

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #315
This commit was merged in pull request #315.
This commit is contained in:
2026-04-18 05:43:33 +09:00
parent bd11e37fd3
commit 48f823a7c8
13 changed files with 561 additions and 97 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
import { apiDelete, apiGet, apiPost } from '@/lib/api'
import type { FetchPostsParams, Post, PostTagChange } from '@/types'
import type { FetchPostsParams, Post, PostVersion } from '@/types'
export const fetchPosts = async (
@@ -29,17 +29,17 @@ export const fetchPost = async (id: string): Promise<Post> => await apiGet (`/po
export const fetchPostChanges = async (
{ id, tag, page, limit }: {
id?: string
{ post, tag, page, limit }: {
post?: string
tag?: string
page: number
limit: number },
): Promise<{
changes: PostTagChange[]
versions: PostVersion[]
count: number }> =>
await apiGet ('/posts/changes', { params: { ...(id && { id }),
...(tag && { tag }),
page, limit } })
await apiGet ('/posts/versions', { params: { ...(post && { post }),
...(tag && { tag }),
page, limit } })
export const toggleViewedFlg = async (id: string, viewed: boolean): Promise<void> => {
+1 -1
View File
@@ -5,7 +5,7 @@ export const postsKeys = {
index: (p: FetchPostsParams) => ['posts', 'index', p] as const,
show: (id: string) => ['posts', id] as const,
related: (id: string) => ['related', id] as const,
changes: (p: { id?: string; tag?: string; page: number; limit: number }) =>
changes: (p: { post?: string; tag?: string; page: number; limit: number }) =>
['posts', 'changes', p] as const }
export const tagsKeys = {