From ad7d23080039e77758fd52330bad664590d6d4f3 Mon Sep 17 00:00:00 2001 From: Gitanjli <96485413+gitanjli525@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:22:39 +0530 Subject: [PATCH] fix: api not getting called due to user permission data not updated (#1565) --- src/entryPoints/HyperSwitchApp.res | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entryPoints/HyperSwitchApp.res b/src/entryPoints/HyperSwitchApp.res index ad2293167..8d45654c0 100644 --- a/src/entryPoints/HyperSwitchApp.res +++ b/src/entryPoints/HyperSwitchApp.res @@ -65,6 +65,11 @@ let make = () => { try { Window.connectorWasmInit()->ignore let _ = await fetchPermissions() + + // This needs to be removed + // TODO: change userPermissionJson type to option + await HyperSwitchUtils.delay(2000) + switch url.path->urlPath { | list{"unauthorized"} => RescriptReactRouter.push(appendDashboardPath(~url="/home")) | _ => ()