From 90e1c8368e55d34477ea90991740f983a77ff01b Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sun, 16 Mar 2025 20:22:34 -0700 Subject: [PATCH] fix: poll votes after reaching minimum message count (#869) --- components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/chat.tsx b/components/chat.tsx index 1a651c8..4926119 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -55,7 +55,7 @@ export function Chat({ }); const { data: votes } = useSWR>( - `/api/vote?chatId=${id}`, + messages.length >= 2 ? `/api/vote?chatId=${id}` : null, fetcher, );