mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-04 14:45:40 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e33052516 | |||
| b9ef6e6eb3 | |||
| 071d2b4de7 |
@@ -18,7 +18,7 @@ export const fetchUser = (
|
||||
}
|
||||
): Promise<ApiUser | false> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
fetchApi<ApiUser>('/users/me')
|
||||
fetchApi<ApiUser>('/users/me/')
|
||||
.then(resolve)
|
||||
.catch((error) => {
|
||||
// we assume that a 401 means the user is not logged in
|
||||
|
||||
@@ -12,7 +12,7 @@ import { keys } from '@/api/queryKeys'
|
||||
import { queryClient } from '@/api/queryClient'
|
||||
import { ApiError } from '@/api/ApiError'
|
||||
|
||||
export const POLL_INTERVAL_MS = 1000
|
||||
export const POLL_INTERVAL_MS = 3000
|
||||
export const LAZY_POLL_INTERVAL_MS = 10_000
|
||||
|
||||
export const LobbyProvider = () => {
|
||||
@@ -37,7 +37,7 @@ export const LobbyProvider = () => {
|
||||
if (isParticipantsOpen) return POLL_INTERVAL_MS
|
||||
return LAZY_POLL_INTERVAL_MS
|
||||
},
|
||||
refetchIntervalInBackground: true,
|
||||
refetchIntervalInBackground: false,
|
||||
})
|
||||
|
||||
// Triggers: each one-shot, idempotent, deduped by React Query if
|
||||
|
||||
Reference in New Issue
Block a user