-
Notifications
You must be signed in to change notification settings - Fork 153
feat(affiliate): 6 - add referral banner and deeplink handler #6435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/affiliate-ui-5
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds the infrastructure that prepares affiliates for user-facing entry points:
ReferralNetworkBannersurfaces a Lingui-backed warning while the modal is open but the wallet is disconnected or on an unsupported chain.ReferralDeepLinkHandlerlistens for?ref=CODEquery params, sanitises/normalises them, triggers the referral modal, persists the code, fires analytics, and removes the parameter from the URL.referralApinow resolves its base URL via env fallbacks (staging → default) while keeping the timeout configurable.Everything stays unmounted for now; integration happens in later PRs.
To Test
yarn lintDeep-link smoke test (manual/connect dev tools)
ReferralProvider+ReferralDeepLinkHandlerin Storybook or a sandbox/sandbox?ref=MYCODE→ Handler sanitises code, opens modal (referral.modalOpen === true), and removes the query paramuseCowAnalytics().sendEventreceivescode_savedwith labeldeeplinkBanner behaviour (manual)
<ReferralNetworkBanner />renders the warning copyBackground
This slice deliberately ships headless logic so reviewers can validate the deep-link and banner behaviour before the modal UI is mounted in later branches.