import { Copy, Heart } from 'lucide-react'; 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'; type InviteFriendsProps = { refByUserCount: number; }; export function InviteFriends(props: InviteFriendsProps) { const { refByUserCount } = props; const user = useAuth(); const { copyText, isCopied } = useCopyText(); const referralLink = new URL( `/signup?rc=${user?.id}`, import.meta.env.DEV ? 'http://localhost:3000' : 'https://roadmap.sh', ).toString(); return (

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) => ( ))}

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

See how you rank on the leaderboard

); }