File size: 632 Bytes
5da4770 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import { createQueryKeys } from "@/hooks/use-query";
const projectKeysBase = ['projects'] as const;
const threadKeysBase = ['threads'] as const;
export const projectKeys = createQueryKeys({
all: projectKeysBase,
lists: () => [...projectKeysBase, 'list'] as const,
details: (projectId: string) => [...projectKeysBase, 'detail', projectId] as const,
public: () => [...projectKeysBase, 'public'] as const,
});
export const threadKeys = createQueryKeys({
all: threadKeysBase,
lists: () => [...threadKeysBase, 'list'] as const,
byProject: (projectId: string) => [...threadKeysBase, 'by-project', projectId] as const,
}); |