This commit is contained in:
Mike Cao committed 2024-09-30 21:48:38 -07:00
commit 6a0e88cd70
8 files changed
+155 -12

No files matched your search

@@ -0,0 +1,18 @@
import { useApi } from './useApi';
export function useRevenueValues(websiteId: string, startDate: Date, endDate: Date) {
const { get, useQuery } = useApi();
return useQuery({
queryKey: ['revenue:values', { websiteId, startDate, endDate }],
queryFn: () =>
get(`/reports/revenue`, {
websiteId,
startDate,
endDate,
}),
enabled: !!(websiteId && startDate && endDate),
});
}
export default useRevenueValues;