Skip to content

Commit

Permalink
Polling on comments (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
camilovegag authored May 17, 2024
1 parent 119e0fc commit 037d138
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/berlin/src/pages/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function Comments() {
queryKey: ['option', optionId, 'comments'],
queryFn: () => fetchComments({ optionId: optionId || '' }),
enabled: !!optionId,
refetchInterval: 5000, // Poll every 5 seconds
});

const sortedComments = useMemo(() => {
Expand Down

0 comments on commit 037d138

Please sign in to comment.