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
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ export interface IChatSilence {
const chatKeys = { const chatKeys = {
chat: (chatId?: string) => ['chats', 'chat', chatId] as const, chat: (chatId?: string) => ['chats', 'chat', chatId] as const,
chatMessages: (chatId: string) => ['chats', 'messages', 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, chatSilences: ['chatSilences'] as const,
}; };