From 2460345ba59d4114c6c29cba504b0948958b515a Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Thu, 25 Apr 2024 10:27:58 +0700 Subject: [PATCH] fix: Unapproved workspace appears in workspace switcher --- src/pages/WorkspaceSwitcherPage/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/WorkspaceSwitcherPage/index.tsx b/src/pages/WorkspaceSwitcherPage/index.tsx index f65ce10ce649..b90d129f91eb 100644 --- a/src/pages/WorkspaceSwitcherPage/index.tsx +++ b/src/pages/WorkspaceSwitcherPage/index.tsx @@ -107,7 +107,7 @@ function WorkspaceSwitcherPage() { } return Object.values(policies) - .filter((policy) => PolicyUtils.shouldShowPolicy(policy, !!isOffline)) + .filter((policy) => PolicyUtils.shouldShowPolicy(policy, !!isOffline) && !policy?.isJoinRequestPending) .map((policy) => ({ text: policy?.name ?? '', policyID: policy?.id ?? '',