Skip to content

Commit ccbd7e4

Browse files
committed
Gate with feature flag
1 parent c58a20e commit ccbd7e4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

static/gsApp/hooks/useMetricDetectorLimit.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
import useOrganization from 'sentry/utils/useOrganization';
2+
13
type MetricDetectorLimitResponse = {
24
isLimitExceeded: boolean;
35
limit: number;
46
numMetricMonitors: number;
5-
} | null;
7+
} | null; // null means there is no limit
68

79
// TODO: Replace with actual hook
810
export function useMetricDetectorLimit(): MetricDetectorLimitResponse {
11+
const organization = useOrganization();
12+
13+
if (!organization.features.includes('workflow-engine-metric-detector-limit')) {
14+
return null;
15+
}
16+
917
return {
1018
isLimitExceeded: true,
1119
numMetricMonitors: 20,

0 commit comments

Comments
 (0)