Files
supabase/apps/studio/data/analytics/project-daily-stats-queries.ts
Ivan Vasilov 56d40fe0b2 chore: Migrate eslint for all apps to use flat config (#39486)
* Use the "eslint" command instead of built-in next lint since it's getting obsolete.

* Bump all deps to support eslint 9+.

* Convert the rules in eslint-config-supabase to be flat-config compatible.

* Migrate all apps to use the new eslint config rules.

* Fix all errors found in the new setup.

* Fix the no default exports ignores.

* Scan all files for linting in studio.

* Fix all lint errors.

* Make the reportUnusedDisableDirectives a warning.
2025-10-15 16:35:24 +02:00

25 lines
655 B
TypeScript

import type { ProjectDailyStatsAttribute } from './project-daily-stats-query'
import { useProjectDailyStatsQuery } from './project-daily-stats-query'
export function useProjectDailyStatsQueries(
attributes: ProjectDailyStatsAttribute[],
ref: string | string[] | undefined,
startDate: string,
endDate: string,
data: any,
isVisible: boolean
) {
return attributes.map((attribute) =>
// eslint-disable-next-line react-hooks/rules-of-hooks
useProjectDailyStatsQuery(
{
projectRef: ref as string,
attribute,
startDate,
endDate,
},
{ enabled: data === undefined && isVisible }
)
)
}