From 35f6097a1bd01381abd06abf0c1fc61970ac6908 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 3 Oct 2024 15:55:19 +0100 Subject: [PATCH] Update referral design --- .../AccountStreak/InviteFriends.tsx | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/components/AccountStreak/InviteFriends.tsx b/src/components/AccountStreak/InviteFriends.tsx index 791d7be58..1cbcd7128 100644 --- a/src/components/AccountStreak/InviteFriends.tsx +++ b/src/components/AccountStreak/InviteFriends.tsx @@ -1,4 +1,4 @@ -import { Copy } from 'lucide-react'; +import { Copy, Heart } from 'lucide-react'; import { useAuth } from '../../hooks/use-auth'; import { useCopyText } from '../../hooks/use-copy-text'; import { cn } from '../../lib/classname'; @@ -19,13 +19,38 @@ export function InviteFriends(props: InviteFriendsProps) { import.meta.env.DEV ? 'http://localhost:3000' : 'https://roadmap.sh', ).toString(); + if (refByUserCount === 1) { + return ( +
+

Invite 5 Friends to roadmap.sh

+
+
+ + + + + +
+

2 of 5 friends invited

+
+

+ Share{' '} + to + invite your friends. +

+
+ ); + } + return (
-
+
-

Invite Friends

-

- Share the link below to invite anyone to roadmap.sh +

Invite Friends

+

+ Invite your friends to join roadmap.sh

@@ -62,7 +87,7 @@ export function InviteFriends(props: InviteFriendsProps) {
-

+

{refByUserCount > 0 && ( <> 🥳 You have invited{' '} @@ -74,7 +99,7 @@ export function InviteFriends(props: InviteFriendsProps) { {refByUserCount === 0 && <>🤔 You haven't invited anyone yet}

-

+