mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 04:47:08 +00:00
Fix useEffect dependency array in create alert page
Agent-Logs-Url: https://github.com/fosrl/pangolin/sessions/4337e8e4-2110-45ae-bbf9-63f273d2a9a3 Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1b183d32c0
commit
3ac315b52e
@@ -18,14 +18,15 @@ export default function NewAlertRulePage() {
|
||||
const isPaid = isPaidUser(tierMatrix.alertingRules);
|
||||
const { env } = useEnvContext();
|
||||
const router = useRouter();
|
||||
const disableEnterpriseFeatures = env.flags.disableEnterpriseFeatures;
|
||||
|
||||
useEffect(() => {
|
||||
if (env.flags.disableEnterpriseFeatures) {
|
||||
if (disableEnterpriseFeatures) {
|
||||
router.replace(`/${orgId}/settings/alerting/rules`);
|
||||
}
|
||||
}, [env.flags.disableEnterpriseFeatures, orgId, router]);
|
||||
}, [disableEnterpriseFeatures, orgId, router]);
|
||||
|
||||
if (env.flags.disableEnterpriseFeatures) {
|
||||
if (disableEnterpriseFeatures) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user