PageSourceSearch

https://cueai.app/assets/ReferralLandingPage-yJjxH1TL.js

js cueai.app collected 2026-10-03 20:07:38 UTC 6,897 bytes, 1 lines download raw bytes

1import{j as e}from"./index-eWsBFN2I.js";import{d as v,r as i}from"./vendor-D0DPC5LU.js";const y="https://api.cueai.app",j="https://play.google.com/store/apps/details?id=cueai.app",w="https://apps.apple.com/app/cue-ai/id6504464724";function N(){return y}function _(a){return(a||"").trim().toLowerCase()}function C(a){return`cueai://cueai.app/r/${encodeURIComponent(a)}`}function S(a){const r=encodeURIComponent(`referral_code=${a}`);return`${j}&referrer=${r}`}const A=()=>{const{code:a}=v(),r=_(a),[n,s]=i.useState(null),[l,c]=i.useState(!0),[m,o]=i.useState("idle"),d=i.useMemo(()=>C(r),[r]),p=i.useMemo(()=>S(r),[r]);i.useEffect(()=>{let t=!0;async function k(){if(!r){if(!t)return;s({valid:!1,status:"missing_code",message:"This referral link is missing its code."}),c(!1);return}try{const g=await(await fetch(`${N()}/api/v1/sharing/referral-resolve?referral_code=${encodeURIComponent(r)}`)).json();if(!t)return;s(g)}catch{if(!t)return;s({valid:!1,status:"request_failed",message:"Could not load this referral right now."})}finally{t&&c(!1)}}return k(),()=>{t=!1}},[r]),i.useEffect(()=>{if(!r)return;const t=window.setTimeout(()=>{window.location.href=d},250);return()=>window.clearTimeout(t)},[d,r]);async function h(){if(!r){o("error");return}try{await navigator.clipboard.writeText(r),o("done")}catch{o("error")}}const u=n?.valid!==!1,f=n?.referrer_name&&n.referrer_name.trim().length>0?n.referrer_name.trim():"A Cue friend",x=n?.referred_reward_cues??50;return e.jsxs("main",{className:"relative min-h-screen bg-bone dark:bg-linen-dark text-ink dark:text-ink-dark overflow-hidden px-6 py-8",children:[e.jsx("div",{"aria-hidden":!0,className:"hero-silk-ribbon opacity-50"}),e.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-4xl items-center justify-center",children:e.jsxs("div",{className:"grid w-full gap-6 lg:grid-cols-[1.15fr_0.85fr]",children:[e.jsxs("section",{className:"rounded-[28px] border border-mist dark:border-mist-dark bg-bone/90 dark:bg-linen-dark/80 backdrop-blur-md p-8 shadow-[0_30px_80px_rgba(21,26,28,0.10)] backdrop-blur",children:[e.jsx("div",{className:"mb-6 inline-flex rounded-full border border-[color:var(--hue-primary)]/30 bg-[color:var(--hue-primary)]/12 px-4 py-2 text-footnote font-semibold text-[color:var(--hue-deep)]",children:"Cue referral"}),e.jsx("h1",{className:"max-w-2xl text-4xl font-bold tracking-tight text-ink dark:text-ink-dark sm:text-5xl",children:l?"Opening your Cue invite...":u?`${f} invited you to Cue`:"This referral link is not available"}),e.jsx("p",{className:"mt-4 max-w-2xl text-lg leading-8 text-inkSoft dark:text-inkSoft-dark",children:l?"We are checking the invite and trying to open the app for you now.":u?`Create your account in Cue and claim ${x} bonus cues for Cue Assistant. On Android, the Play Store link below keeps the referral attached through install.`:n?.message||"The invite may have expired or the code is invalid."}),e.jsxs("div",{className:"mt-8 grid gap-4 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-3xl border border-mist dark:border-mist-dark bg-linen dark:bg-mist-dark/40 p-5",children:[e.jsx("div",{className:"text-sm font-medium text-inkMuted dark:text-inkMuted-dark",children:"Referral code"}),e.jsx("div",{className:"mt-2 text-2xl font-semibold tracking-[0.18em] text-ink dark:text-ink-dark",children:r||"UNKNOWN"})]}),e.jsxs("div",{className:"rounded-3xl border border-mist dark:border-mist-dark bg-linen dark:bg-mist-dark/40 p-5",children:[e.jsx("div",{className:"text-sm font-medium text-inkMuted dark:text-inkMuted-dark",children:"Bonus for new user"}),e.jsxs("div",{className:"mt-2 text-2xl font-semibold text-ink dark:text-ink-dark",children:[x," cues"]})]}),e.jsxs("div",{className:"rounded-3xl border border-mist dark:border-mist-dark bg-linen dark:bg-mist-dark/40 p-5",children:[e.jsx("div",{className:"text-sm font-medium text-inkMuted dark:text-inkMuted-dark",children:"Best path"}),e.jsx("div",{className:"mt-2 text-lg font-semibold text-ink dark:text-ink-dark",children:"Open the app or install then sign up"})]})]}),e.jsxs("div",{className:"mt-8 flex flex-col gap-3 sm:flex-row",children:[e.jsx("a",{href:d,className:"inline-flex items-center justify-center rounded-pill bg-teal dark:bg-teal-dark px-6 py-4 text-body font-[550] text-white shadow-[0_20px_40px_-20px_rgba(36,94,105,0.9)] transition hover:opacity-95",children:"Open Cue"}),e.jsx("a",{href:p,className:"inline-flex items-center justify-center rounded-pill border-[1.5px] border-mist dark:border-mist-dark bg-transparent px-6 py-4 text-body font-medium text-ink dark:text-ink-dark transition hover:bg-linen dark:hover:bg-mist-dark",children:"Get it on Google Play"}),e.jsx("a",{href:w,className:"inline-flex items-center justify-center rounded-pill border-[1.5px] border-mist dark:border-mist-dark bg-transparent px-6 py-4 text-body font-medium text-ink dark:text-ink-dark transition hover:bg-linen dark:hover:bg-mist-dark",children:"Download on the App Store"})]}),e.jsxs("div",{className:"mt-6 rounded-3xl border border-[color:var(--hue-tertiary)]/40 bg-[
1color:var(--hue-tertiary)]/15 p-5 text-footnote leading-7 text-inkSoft dark:text-inkSoft-dark",children:["iPhone fallback: install Cue, then either reopen this same link or enter the code"," ",e.jsx("span",{className:"font-semibold",children:r||"UNKNOWN"})," on the welcome screen to claim the referral. Android installs can attribute automatically from the Play Store link above."]})]}),e.jsxs("aside",{className:"rounded-[28px] border border-mist-dark bg-ink dark:bg-[#101416] p-8 text-bone shadow-[0_24px_60px_rgba(16,20,22,0.25)]",children:[e.jsx("div",{className:"text-sm font-semibold uppercase tracking-[0.24em] text-[color:var(--hue-tertiary)]",children:"How it works"}),e.jsxs("ol",{className:"mt-6 space-y-5 text-base leading-7 text-ink-dark",children:[e.jsx("li",{children:"1. Open Cue if it is already installed."}),e.jsx("li",{children:"2. If not, install it from your store using the button above."}),e.jsx("li",{children:"3. Sign up and the referral bonus will be applied automatically when possible."}),e.jsx("li",{children:"4. If automatic attribution is not available on your device, enter the code manually."})]}),e.jsxs("div",{className:"mt-8 rounded-3xl border border-white/10 bg-white/5 p-5",children:[e.jsx("div",{className:"text-sm font-medium text-inkMuted-dark",children:"Need the code directly?"}),e.jsx("button",{type:"button",onClick:h,className:"mt-4 w-full rounded-2xl border border-white/15 bg-white/10 px-4 py-3 text-left text-base font-semibold transition hover:bg-white/15",children:"Copy referral code"}),e.jsx("div",{className:"mt-3 text-sm text-inkMuted-dark",children:m==="done"?"Referral code copied.":m==="error"?"Could not copy automatically. You can still use the code shown on this page.":"Useful if you install Cue first and enter the code during signup."})]})]})]})})]})};export{A as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.