Skip to content

Commit

Permalink
update: config
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung committed Dec 19, 2024
1 parent b99d5c8 commit cd7ba28
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions ee/tabby-ui/components/notification-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,12 @@ export function NotificationBox({ className, ...rest }: Props) {
query: notificationsQuery
})

useSWR(
'refresh_notifications',
() => {
reexecuteQuery()
},
{
refreshInterval: 1000 * 60 * 10, // 10 mins
revalidateOnMount: false
}
)
useSWR('refresh_notifications', () => reexecuteQuery(), {
revalidateOnFocus: true,
revalidateOnReconnect: true,
revalidateOnMount: false,
refreshInterval: 1000 * 60 * 10 // 10 mins
})

const notifications = useMemo(() => {
return data?.notifications.slice().reverse()
Expand Down

0 comments on commit cd7ba28

Please sign in to comment.