From 69aae55ed5db26b11104bde92468b7a21384e477 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Tue, 4 Jun 2024 20:42:24 +0500 Subject: [PATCH] add redirect when policy connection is enabled --- src/libs/actions/Policy/Policy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 4d918352ba91..451d00cb250f 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -3273,6 +3273,10 @@ function enablePolicyConnections(policyID: string, enabled: boolean) { const parameters: EnablePolicyConnectionsParams = {policyID, enabled}; API.write(WRITE_COMMANDS.ENABLE_POLICY_CONNECTIONS, parameters, onyxData); + + if (enabled && getIsNarrowLayout()) { + navigateWhenEnableFeature(policyID); + } } function enablePolicyDistanceRates(policyID: string, enabled: boolean) {