fix: poll votes after reaching minimum message count (#869)
This commit is contained in:
parent
47a630fd53
commit
90e1c8368e
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ export function Chat({
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data: votes } = useSWR<Array<Vote>>(
|
const { data: votes } = useSWR<Array<Vote>>(
|
||||||
`/api/vote?chatId=${id}`,
|
messages.length >= 2 ? `/api/vote?chatId=${id}` : null,
|
||||||
fetcher,
|
fetcher,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue