File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.limits Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,13 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
9090 } ) ;
9191 }
9292
93- return typedjson ( result ) ;
93+ // Match the queues page pattern: pass a poll interval from the loader
94+ const autoReloadPollIntervalMs = 5000 ;
95+
96+ return typedjson ( {
97+ ...result ,
98+ autoReloadPollIntervalMs,
99+ } ) ;
94100} ;
95101
96102export default function Page ( ) {
@@ -99,8 +105,8 @@ export default function Page() {
99105 const project = useProject ( ) ;
100106 const environment = useEnvironment ( ) ;
101107
102- // Auto-revalidate every 5 seconds to get fresh rate limit data
103- useAutoRevalidate ( { interval : 5000 } ) ;
108+ // Auto-revalidate using the loader-provided interval and refresh on focus
109+ useAutoRevalidate ( { interval : data . autoReloadPollIntervalMs , onFocus : true } ) ;
104110
105111 return (
106112 < PageContainer >
You can’t perform that action at this time.
0 commit comments