このコミットが含まれているのは:
2026-07-04 19:03:50 +09:00
コミット 6a57dc53bf
22個のファイルの変更1099行の追加114行の削除
+6 -2
ファイルの表示
@@ -5,6 +5,7 @@ import { useLocation } from 'react-router-dom'
import PostList from '@/components/PostList'
import PrefetchLink from '@/components/PrefetchLink'
import { useUserSettings } from '@/components/users/UserSettingsProvider'
import TagSidebar from '@/components/TagSidebar'
import WikiBody from '@/components/WikiBody'
import Pagination from '@/components/common/Pagination'
@@ -13,6 +14,7 @@ import MainArea from '@/components/layout/MainArea'
import { SITE_TITLE } from '@/config'
import { fetchPosts } from '@/lib/posts'
import { postsKeys } from '@/lib/queryKeys'
import { toFetchPostsOrder } from '@/lib/settings'
import { fetchWikiPageByTitle } from '@/lib/wiki'
import type { FC } from 'react'
@@ -22,6 +24,7 @@ import type { WikiPage } from '@/types'
const PostListPage: FC = () => {
const containerRef = useRef<HTMLDivElement | null> (null)
const { settings } = useUserSettings ()
const [wikiPage, setWikiPage] = useState<WikiPage | null> (null)
@@ -33,13 +36,14 @@ const PostListPage: FC = () => {
const tags = useMemo (() => tagsQuery.split (' ').filter (e => e !== ''), [tagsQuery])
const tagsKey = tags.join (' ')
const page = Number (query.get ('page') ?? 1)
const limit = Number (query.get ('limit') ?? 20)
const limit = Number (query.get ('limit') ?? settings.postListLimit)
const order = toFetchPostsOrder (settings.postListOrder)
const keys = {
tags: tagsKey, match, page, limit,
url: '', title: '', originalCreatedFrom: '', originalCreatedTo: '',
createdFrom: '', createdTo: '', updatedFrom: '', updatedTo: '',
order: 'original_created_at:desc' } as const
order } as const
const { data, isLoading: loading } = useQuery ({
queryKey: postsKeys.index (keys),
queryFn: () => fetchPosts (keys) })