Skip to content

Commit

Permalink
delay refetch open rooms 1 min, more console to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogge committed Jun 27, 2024
1 parent 1285fc7 commit c6992d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/stores/roomsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const useRoomsStore = defineStore('rooms', () => {
const refetchRooms = async () => {
try {
await openRoomsQueryRefetch()
console.log('refetchRooms', openRoomsQueryResult.value)
if (openRoomsQueryResult.value) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
rooms.value = openRoomsQueryResult.value.openRooms
Expand All @@ -46,7 +47,8 @@ export const useRoomsStore = defineStore('rooms', () => {
setTimeout(refetchRooms, 60 * 1000)
}

void refetchRooms()
// eslint-disable-next-line @typescript-eslint/no-misused-promises
void setTimeout(refetchRooms, 60 * 1000)

const rooms = ref<Room[]>([])

Expand Down

0 comments on commit c6992d8

Please sign in to comment.