From 65829eaf7ee17d465bfaba4f0c308622ebf32cba Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 10 Apr 2024 15:01:41 +0700 Subject: [PATCH 1/2] Fix join workspace flow --- src/pages/workspace/WorkspaceJoinUserPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceJoinUserPage.tsx b/src/pages/workspace/WorkspaceJoinUserPage.tsx index 09f8e9425c74..23adc45c0fec 100644 --- a/src/pages/workspace/WorkspaceJoinUserPage.tsx +++ b/src/pages/workspace/WorkspaceJoinUserPage.tsx @@ -39,7 +39,7 @@ function WorkspaceJoinUserPage({route, policy}: WorkspaceJoinUserPageProps) { }, []); useEffect(() => { - if (!policy || isUnmounted.current || isJoinLinkUsed) { + if (isUnmounted.current || isJoinLinkUsed) { return; } if (!isEmptyObject(policy)) { From e3fa5edeeea01f55e72f2bf3fed7121402b4276e Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Thu, 11 Apr 2024 15:53:37 +0700 Subject: [PATCH 2/2] fix go to inital page after requesting join --- src/pages/workspace/WorkspaceJoinUserPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceJoinUserPage.tsx b/src/pages/workspace/WorkspaceJoinUserPage.tsx index 23adc45c0fec..7cc8e63da2ee 100644 --- a/src/pages/workspace/WorkspaceJoinUserPage.tsx +++ b/src/pages/workspace/WorkspaceJoinUserPage.tsx @@ -42,7 +42,7 @@ function WorkspaceJoinUserPage({route, policy}: WorkspaceJoinUserPageProps) { if (isUnmounted.current || isJoinLinkUsed) { return; } - if (!isEmptyObject(policy)) { + if (!isEmptyObject(policy) && !policy?.isJoinRequestPending) { Navigation.isNavigationReady().then(() => { Navigation.goBack(undefined, false, true); Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policyID ?? ''));