From 3a09982ff69899684e9f5b37717c64d87fd0fb2c Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 8 Aug 2023 22:00:04 +0100 Subject: [PATCH] Show received friend request count in sidebar --- src/components/AccountSidebar.astro | 24 +++++++--- src/components/Friends/EmptyFriends.tsx | 6 +-- src/components/Friends/FriendsPage.tsx | 4 -- .../Friends/SidebarFriendsCounter.tsx | 46 +++++++++++++++++++ 4 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 src/components/Friends/SidebarFriendsCounter.tsx diff --git a/src/components/AccountSidebar.astro b/src/components/AccountSidebar.astro index 1efb1dcb9..3ac54317b 100644 --- a/src/components/AccountSidebar.astro +++ b/src/components/AccountSidebar.astro @@ -1,6 +1,7 @@ --- import AstroIcon from './AstroIcon.astro'; import { TeamDropdown } from './TeamDropdown/TeamDropdown'; +import { SidebarFriendsCounter } from './Friends/SidebarFriendsCounter'; export interface Props { activePageId: string; @@ -142,11 +143,17 @@ const sidebarLinks = [ {sidebarLink.title} - {sidebarLink.isNew && !isActive && ( - - - - + {sidebarLink.isNew && + sidebarLink.id !== 'friends' && + !isActive && ( + + + + + )} + + {sidebarLink.id === 'friends' && ( + )} @@ -159,7 +166,12 @@ const sidebarLinks = [ } -
+
diff --git a/src/components/Friends/EmptyFriends.tsx b/src/components/Friends/EmptyFriends.tsx index e29261851..9b6042755 100644 --- a/src/components/Friends/EmptyFriends.tsx +++ b/src/components/Friends/EmptyFriends.tsx @@ -19,8 +19,8 @@ export function EmptyFriends(props: EmptyFriendsProps) { class="mb-2 h-[60px] w-[60px] opacity-10 sm:h-[120px] sm:w-[120px]" />

Invite your Friends

-

- Invite your friends to join you on your learning journey. +

+ Share the unique link below with your friends to track their skills and progress.

@@ -35,7 +35,7 @@ export function EmptyFriends(props: EmptyFriendsProps) { readonly />