Fix query key when not search query is present

This commit is contained in:
Justin 2022-09-30 10:28:19 -04:00
parent 7fde4a0c5c
commit 65cdaeb886

View file

@ -56,7 +56,7 @@ export interface IChatSilence {
const chatKeys = {
chat: (chatId?: string) => ['chats', 'chat', chatId] as const,
chatMessages: (chatId: string) => ['chats', 'messages', chatId] as const,
chatSearch: (searchQuery?: string) => ['chats', 'search', searchQuery] as const,
chatSearch: (searchQuery?: string) => searchQuery ? ['chats', 'search', searchQuery] : ['chats', 'search'] as const,
chatSilences: ['chatSilences'] as const,
};