From 487145b9a42c34dc48d6d9bca303cbdeebe3f959 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 3 Oct 2024 23:33:27 +0100 Subject: [PATCH] UI redesign for invite page --- .../AccountStreak/InviteFriends.tsx | 94 +++++++++---------- 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/src/components/AccountStreak/InviteFriends.tsx b/src/components/AccountStreak/InviteFriends.tsx index ff3885818..95d7e5f24 100644 --- a/src/components/AccountStreak/InviteFriends.tsx +++ b/src/components/AccountStreak/InviteFriends.tsx @@ -3,7 +3,7 @@ import { useAuth } from '../../hooks/use-auth'; import { useCopyText } from '../../hooks/use-copy-text'; import { cn } from '../../lib/classname'; import { CheckIcon } from '../ReactIcons/CheckIcon'; -import {TrophyEmoji} from "../ReactIcons/TrophyEmoji.tsx"; +import { TrophyEmoji } from '../ReactIcons/TrophyEmoji.tsx'; type InviteFriendsProps = { refByUserCount: number; @@ -21,65 +21,61 @@ export function InviteFriends(props: InviteFriendsProps) { ).toString(); return ( -
-

- Invite people to join roadmap.sh -

-
-
+
+

Invite people to join roadmap.sh

+ +
+

+ {refByUserCount === 0 && <>You haven't invited anyone yet.} + {refByUserCount > 0 && refByUserCount < 10 && ( + <>{refByUserCount} of 10 users joined + )} +

+ + {refByUserCount >= 10 && <>🎉 You've invited {refByUserCount} users} + +
{Array.from({ length: 10 }).map((_, index) => ( ))}
- {refByUserCount === 0 && ( -

You haven't invited anyone yet.

- )} - - {refByUserCount > 0 && refByUserCount < 10 && ( -

{refByUserCount} of 10 users joined

- )} - - {refByUserCount >= 10 && ( -

- 🎉 You've invited {refByUserCount} users -

- )} +

+ Share the link below with anyone you think would benefit from using + roadmap.sh +

+

+ +

-

- Share{' '} - {' '} - with anyone you think would benefit from roadmap.sh -

-

+