From 23dfdd37e5cdeb8827867c9bbc8187736451a807 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Thu, 27 Jul 2023 23:16:30 +0600 Subject: [PATCH] fix: guard clause --- src/components/TeamDropdown/TeamDropdown.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/TeamDropdown/TeamDropdown.tsx b/src/components/TeamDropdown/TeamDropdown.tsx index 52708935a..dce18d218 100644 --- a/src/components/TeamDropdown/TeamDropdown.tsx +++ b/src/components/TeamDropdown/TeamDropdown.tsx @@ -76,13 +76,13 @@ export function TeamDropdown() { .filter((team) => team.status === 'invited') .map((team) => team._id); - // if ( - // !user?.email.endsWith('@insightpartners.com') && - // !user?.email.endsWith('@roadmap.sh') && - // !['arikchangma@gmail.com', 'kamranahmed.se@gmail.com', 'stephen.chetcuti@gmail.com'].includes(user?.email!) - // ) { - // return null; - // } + if ( + !user?.email.endsWith('@insightpartners.com') && + !user?.email.endsWith('@roadmap.sh') && + !['arikchangma@gmail.com', 'kamranahmed.se@gmail.com', 'stephen.chetcuti@gmail.com'].includes(user?.email!) + ) { + return null; + } return (