diff --git a/src/components/AccountSidebar.astro b/src/components/AccountSidebar.astro index 93553f3ec..ca3c72acb 100644 --- a/src/components/AccountSidebar.astro +++ b/src/components/AccountSidebar.astro @@ -25,7 +25,7 @@ const sidebarLinks = [ href: '/account/road-card', title: 'Card', id: 'road-card', - isNew: true, + isNew: false, icon: { glyph: 'badge', classes: 'h-4 w-4', diff --git a/src/components/TeamDropdown/TeamDropdown.tsx b/src/components/TeamDropdown/TeamDropdown.tsx index f150afb9c..a5de91266 100644 --- a/src/components/TeamDropdown/TeamDropdown.tsx +++ b/src/components/TeamDropdown/TeamDropdown.tsx @@ -31,6 +31,24 @@ export function TeamDropdown() { const user = useAuth(); const { teamId } = useTeamId(); + const [shouldShowTeamsIndicator, setShouldShowTeamsIndicator] = + useState(false); + + useEffect(() => { + // Show team dropdown "New" indicator to first 3 refreshes + const viewedTeamsCount = localStorage.getItem('viewedTeamsCount'); + const viewedTeamsCountNumber = parseInt(viewedTeamsCount || '0', 10); + const shouldShowTeamIndicator = viewedTeamsCountNumber < 5; + + setShouldShowTeamsIndicator(shouldShowTeamIndicator); + if (shouldShowTeamIndicator) { + localStorage.setItem( + 'viewedTeamsCount', + (viewedTeamsCountNumber + 1).toString() + ); + } + }, []); + const teamList = useStore($teamList); const currentTeam = useStore($currentTeam); @@ -78,21 +96,21 @@ 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; - } - return ( <>