ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
825 B

  1. import type { FetchPostsParams, FetchTagsParams } from '@/types'
  2. export const postsKeys = {
  3. root: ['posts'] as const,
  4. index: (p: FetchPostsParams) => ['posts', 'index', p] as const,
  5. show: (id: string) => ['posts', id] as const,
  6. related: (id: string) => ['related', id] as const,
  7. changes: (p: { post?: string; tag?: string; page: number; limit: number }) =>
  8. ['posts', 'changes', p] as const }
  9. export const tagsKeys = {
  10. root: ['tags'] as const,
  11. index: (p: FetchTagsParams) => ['tags', 'index', p] as const,
  12. show: (name: string) => ['tags', name] as const }
  13. export const wikiKeys = {
  14. root: ['wiki'] as const,
  15. index: (p: { title?: string }) => ['wiki', 'index', p] as const,
  16. show: (title: string, p: { version?: string }) => ['wiki', title, p] as const }