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, );