default to last 24h in free, 7 days in paid (#35799)

This commit is contained in:
Jordi Enric
2025-05-23 11:48:14 +02:00
committed by GitHub
parent 76b123cfb0
commit 49774acaa6

View File

@@ -65,7 +65,9 @@ const ProjectUsage = () => {
const { plan } = useCurrentOrgPlan()
const [interval, setInterval] = useState<ProjectLogStatsVariables['interval']>('minutely')
const DEFAULT_INTERVAL = plan?.id === 'free' ? 'hourly' : 'daily'
const [interval, setInterval] = useState<ProjectLogStatsVariables['interval']>(DEFAULT_INTERVAL)
const { data, isLoading } = useProjectLogStatsQuery({ projectRef, interval })