File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -17,23 +17,21 @@ const ERROR_COUNT = -1;
17
17
export function useMetricDetectorLimit ( ) : MetricDetectorLimitResponse {
18
18
const organization = useOrganization ( ) ;
19
19
const subscription = useSubscription ( ) ;
20
- const has_flag = organization . features . includes (
21
- 'workflow-engine-metric-detector-limit'
22
- ) ;
20
+ const hasFlag = organization . features . includes ( 'workflow-engine-metric-detector-limit' ) ;
23
21
24
22
const { isLoading, isError, getResponseHeader} = useDetectorsQuery (
25
23
{
26
24
query : 'type:metric' ,
27
25
limit : 0 ,
28
26
} ,
29
- { enabled : has_flag }
27
+ { enabled : hasFlag }
30
28
) ;
31
29
32
30
const hits = getResponseHeader ?.( 'X-Hits' ) ;
33
31
const detectorCount = hits ? parseInt ( hits , 10 ) : ERROR_COUNT ;
34
32
const detectorLimit = subscription ?. planDetails ?. metricDetectorLimit ?? UNLIMITED_QUOTA ;
35
33
36
- if ( ! has_flag || detectorLimit === UNLIMITED_QUOTA ) {
34
+ if ( ! hasFlag || detectorLimit === UNLIMITED_QUOTA ) {
37
35
return {
38
36
hasReachedLimit : false ,
39
37
detectorLimit : UNLIMITED_QUOTA ,
You can’t perform that action at this time.
0 commit comments