Skip to content

Revamp /referral with the Give & Endowment design language#908

Draft
TylerDiorio wants to merge 4 commits into
mainfrom
cursor/revamp-referral-design-3019
Draft

Revamp /referral with the Give & Endowment design language#908
TylerDiorio wants to merge 4 commits into
mainfrom
cursor/revamp-referral-design-3019

Conversation

@TylerDiorio

Copy link
Copy Markdown
Member

Summary

Revamps /referral into a standalone, immersive landing-style page that is a visual sibling of /give and /endowment, while preserving 100% of existing referral functionality.

Like give/endowment, the page now drops the PageLayout app shell in favor of its own standalone layout, a scroll-triggered top bar (with a back button via useSmartBack so users return into the app), styled-jsx sections, and the shared LandingPageFooter. All root providers (UserProvider, ToasterProvider, etc.) wrap every page, so functionality is fully preserved without PageLayout. The route stays auth-gated by middleware and noindex via getReferralMetadata.

New section flow

  • Hero — dark cosmos background (Starfield + indigo gradient + blob), AnimatedGlobe centerpiece, Cal Sans headline with blue accent, assurance badges, Copy-link + "See how it works" CTAs.
  • Share card — cosmos→light transition (CosmosPixelFade + PixelBackdrop); link input + Copy + QR + X/LinkedIn/Bluesky, reusing QRCodeModal and preserving all analytics events.
  • How it works — 3 hover-lift cards keeping the existing /public/referral/*.webp illustrations.
  • Impact — light-blue band with restyled stat cards; preserves live my_metrics data, GSAP count-up, credits tooltip CTAs, and error/skeleton states.
  • Referred network — restyled paginated list; preserves network_details pagination, avatars/AuthorTooltip, and expired/expiring-soon UX, plus empty/error/skeleton states.
  • Calculator — cosmos-themed restyle; preserves the 0–50k slider and 10% math.
  • FAQ — new give-style accordion with referral-specific Q&A.

Implementation notes

  • New colocated components under app/referral/components/ (mirrors give/endowment).
  • Share/copy/social logic centralized in a useReferralShare hook (single source of truth for the link, clipboard copy, social intents, and analytics events).
  • Removed the now-unused components/Referral dashboard files (ReferralDashboard, ReferralHeader, ReferralLinkCard, HowItWorksSection, ReferralImpactSection, ReferredUsersList, ReferralCalculator, and the three skeletons) and trimmed the barrel (retained QRCodeModal, which the new share card reuses). The moderator dashboard at /moderators/referral uses separate components/hooks and is unaffected.

Testing

  • npm run type-check — passes.
  • npx eslint app/referral components/Referral/index.ts — passes.
  • Manual visual walkthrough — see attached artifacts.
Open in Web Open in Cursor 

Convert /referral into a standalone immersive landing page that mirrors
/give and /endowment: cosmos hero with AnimatedGlobe, scroll-triggered top
bar with back button, styled-jsx sections (Cal Sans headings, gradient
accents, hover-lift cards), light-blue impact band, cosmos calculator, and
a FAQ accordion, ending in the shared LandingPageFooter.

All existing functionality is preserved: referral link copy/QR/social share
with analytics, live impact metrics with GSAP count-up and credits tooltip
CTAs, paginated referred-users list with expiration UX, and the 10% bonus
calculator. Share/copy/social logic is centralized in a useReferralShare
hook. Removes the now-unused components/Referral dashboard files.
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 18, 2026 4:31am

Add a min-width to the hero and top-bar copy buttons so swapping the
label to 'Copied!' no longer shrinks the button or nudges the adjacent
'See how it works' CTA.
Replace the give-style starfield + AnimatedGlobe hero visuals with a
referral-specific treatment: a vibrant brand-blue field with a static
connection-mesh background (ReferralMesh) and a custom animated
referral-network centerpiece (ReferralNetworkGraphic) showing 'you' at
the hub branching to the funders you refer, with RSC-orange pulses
flowing outward. This keeps the page in the brand family while giving it
a distinct hero from give (globe/cosmos) and endowment (tree/light).

Also format the calculator's 'You receive' / 'Funder receives' amounts
as whole dollars (no cents) to match the contribution input.
Use 'Refer a funder, get rewarded.' rather than 'get paid': the bonus is
non-redeemable Funding Credits that can only fund research, so 'paid'
would imply personal cash compensation that doesn't exist. 'Rewarded' is
accurate for non-cash program benefits, and the lead now clarifies the
credits go toward funding research.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants