Typescript error for empty array with useQueries - TanStack