PageSourceSearch

https://tbuddy.app/assets/app.refer.leaderboard-Ck8S0mBq.js

js tbuddy.app collected 2026-10-02 01:17:13 UTC 2,469 bytes, 1 lines download raw bytes

1import{e as d,E as n,s as i,j as e,A as c,L as m,aU as o}from"./index-BOoZFuWa.js";import{T as x}from"./trophy-1OJ8FeBL.js";function f(){const r=d(),{data:t,isLoading:l}=n({queryKey:["referrals-leaderboard","page"],staleTime:6e4,queryFn:async()=>{const{data:s}=await i.rpc("referrals_leaderboard",{_limit:100});return s||[]}});return e.jsxs("div",{className:"mx-auto max-w-md pb-24",children:[e.jsxs("header",{className:"safe-top px-4 py-3 flex items-center gap-3",children:[e.jsx("button",{onClick:()=>r({to:"/app/refer"}),"aria-label":"Back",className:"size-9 rounded-full bg-card shadow-soft flex items-center justify-center",children:e.jsx(c,{className:"size-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h1",{className:"font-display font-semibold text-lg leading-tight inline-flex items-center gap-2",children:[e.jsx(x,{className:"size-5 text-amber-500"})," Top referrers"]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Ranked by approved referrals"})]})]}),e.jsx("section",{className:"mx-5 mt-2 rounded-2xl bg-card border border-border/60 p-4 shadow-soft",children:l?e.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"}):t?.length?e.jsx("ol",{className:"space-y-3",children:t.map((s,a)=>e.jsxs("li",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`size-7 rounded-full flex items-center justify-center text-[11px] font-bold ${a===0?"bg-amber-500 text-white":a===1?"bg-neutral-300 text-neutral-900":a===2?"bg-amber-700 text-white":"bg-muted text-muted-foreground"}`,children:a+1}),e.jsxs(m,{to:"/app/profile/$id",params:{id:s.user_id},className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("img",{src:s.avatar_url||"/favicon.ico",alt:"",className:"size-9 rounded-full object-cover bg-muted"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-semibold truncate",children:s.display_name||"Referrer"}),s.handle&&e.jsxs("p",{className:"text-[11px] text-muted-foreground truncate",children:["@",s.handle]})]})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("p",{className:"text-sm font-bold text-emerald-600",children:s.approved_count}),e.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:o(s.earned_cents||0)})]})]},s.user_id))}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"No approved referrals yet. Be the first to make it here."})})]})}export{f as component};

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.