Skip to content

Referral invite landing page at /invite/:code - #11

Open
memohnsen wants to merge 2 commits into
masterfrom
claude/meetcal-referral-rewards-ejq5un
Open

Referral invite landing page at /invite/:code#11
memohnsen wants to merge 2 commits into
masterfrom
claude/meetcal-referral-rewards-ejq5un

Conversation

@memohnsen

Copy link
Copy Markdown
Collaborator

Summary

The landing page that the app's referral share links (https://meetcal.app/invite/{CODE}) point to. Its only job is to route visitors to the mobile app with their code — web subscriptions are excluded from the referral program, so this page offers no web checkout. Companion PRs: meetcal-backend and meetcal-app on the same branch claude/meetcal-referral-rewards-ejq5un.

What's included

  • /invite/:code route (src/pages/invite.rs), registered following the existing page/routing conventions.
  • Prominent code display with copy-to-clipboard, "Open in app" (meetcal://invite/{code}) for existing installs, and App Store / Play Store buttons reusing the real store URLs already in the marketing pages.
  • Code param is sanitized (charset + length); a malformed/empty code hides the code block and shows a generic download CTA. XSS-safe (Leptos text nodes).
  • Plain-language note that the friend gets the app's normal offer and the inviter earns rewards when friends subscribe — with an explicit "rewards are available through the mobile app only".
  • vercel.json rewrite added so direct loads / refreshes of the client-side route resolve (the config wasn't a catch-all).
  • Styling reuses existing design tokens; light + dark themes.

Testing

  • cargo fmt --check clean; cargo check passes on both host and the wasm32-unknown-unknown target.
  • trunk isn't available in the build environment, so a full bundle wasn't produced — compilation verified via the wasm-target check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VsMx91snaHTFimvs7zaY11


Generated by Claude Code

Adds an InvitePage that routes referral share-link visitors
(https://meetcal.app/invite/{CODE}) to the mobile app with their code.

- New route /invite/:code registered in main.rs, module in pages/mod.rs
- Displays the code prominently with a copy-to-clipboard button
- App Store and Google Play links (reused from the marketing pages)
- "Open in app" deep link (meetcal://invite/{code})
- Malformed/empty codes fall back to a generic download CTA
- Plain-language note: friend gets the app's normal offer, inviter
  earns rewards when friends subscribe; web checkout not offered
- vercel.json rewrite for /invite/:path* -> /index.html (SPA routing)
- invite-* styles in styles.css matching the home page

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsMx91snaHTFimvs7zaY11
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
meetcal-web Ready Ready Preview, Comment Jul 22, 2026 8:04pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d8d717e58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.rs
<Route path=path!("/results") view=|| view! { <SubscriptionGate><Results /></SubscriptionGate> } />
<Route path=path!("/rankings") view=|| view! { <SubscriptionGate><Rankings /></SubscriptionGate> } />
<Route path=path!("/features") view=FeaturesPage />
<Route path=path!("/invite/:code") view=InvitePage />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a route for bare invite links

When a user lands on /invite or /invite/ with the code segment missing or stripped, this new route does not match, so InvitePage never mounts and the None branch meant to show the generic download CTA is unreachable; the user gets the not-found route instead of the invite landing page. Add a /invite route (or make the param optional) so missing-code invite links render the intended fallback.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4790596. Added a bare /invite route pointing at the same InvitePage (which already renders the generic download CTA when the code param is absent), plus a matching /invite Vercel rewrite so a direct load resolves. /invite and /invite/ now show the fallback instead of NotFound.


Generated by Claude Code

Add a `/invite` route (and matching Vercel rewrite) alongside `/invite/:code`,
so a missing/stripped code renders InvitePage's generic download CTA instead of
falling through to the NotFound route. The page already handles an absent code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsMx91snaHTFimvs7zaY11
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