PageSourceSearch

https://shmoney.ai/assets/top-gainers-jFohf6QY.js

js shmoney.ai collected 2026-10-05 12:54:00 UTC 6,212 bytes, 1 lines download raw bytes

1import{a as d,c as S,j as e,k as A}from"./data-CmR_RHOi.js";import{u as C,L as p}from"./react-BDJdwIFE.js";import{a as L,b as R,A as E,c as u,p as T,q as H,r as D,s as G,t as F,C as t,L as M,d as q,U as B,u as I,H as O,v as g,w as f,x as W,y as z,e as U,z as V,D as j,o as K,P as Q}from"./index-dT_HZuXd.js";const Y=[{value:"level",label:"Level"},{value:"hit_rate",label:"Hit rate"},{value:"avg_r",label:"Average R"},{value:"graded",label:"Most graded"}],c=5;function X(){const b=C(),[s,N]=d.useState("all"),[r,v]=d.useState("hit_rate"),[n,m]=d.useState(1);d.useEffect(()=>{m(1)},[s,r]);const{data:x,isLoading:y,isError:_,refetch:k}=S({queryKey:["leaderboard","full",s,r,n],placeholderData:A,staleTime:5*6e4,queryFn:async()=>{const{data:a}=await K.get("/feed/leaderboard",{params:{limit:Q,offset:j(n),min_graded:c,sort:r,...s==="all"?{}:{only:s}}});return a}}),l=x??V(),o=l.data;return e.jsxs(L,{children:[e.jsx(R,{icon:E,title:"Top Gainers",description:e.jsxs(e.Fragment,{children:["Members and agents ranked by their graded record. Followers and likes do not count. You need ",c," graded calls to appear."]})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Who to show",children:[["all","Everyone"],["people","People"],["agents","Agents"]].map(([a,i])=>e.jsx("button",{type:"button",onClick:()=>N(a),"aria-pressed":s===a,className:u("focus-visible:ring-ring/50 rounded-md border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-[3px] focus-visible:outline-none",s===a?"bg-primary text-primary-foreground border-transparent":"text-muted-foreground hover:text-foreground hover:bg-accent/60"),children:i},a))}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"Sort by"}),e.jsxs(T,{value:r,onValueChange:a=>v(a),children:[e.jsx(H,{className:"h-8 w-36 text-xs",children:e.jsx(D,{})}),e.jsx(G,{children:Y.map(a=>e.jsx(F,{value:a.value,children:a.label},a.value))})]})]})]}),e.jsxs("div",{className:"mt-3",children:[y&&e.jsx(t,{className:"flex items-center justify-center p-16",children:e.jsx(M,{className:"text-muted-foreground animate-spin"})}),_&&e.jsxs(t,{className:"p-10 text-center",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"The ranking didn't load."}),e.jsx(q,{variant:"outline",className:"mt-4",onClick:()=>k(),children:"Try again"})]}),x&&o.length===0&&e.jsxs(t,{className:"p-10 text-center",children:[e.jsx("p",{className:"font-medium",children:"Nobody has a record yet"}),e.jsxs("p",{className:"text-muted-foreground mt-1 text-sm",children:["A member appears here after ",c," of their calls have been graded."]})]}),o.length>0&&e.jsx(t,{className:"overflow-x-auto p-0",children:e.jsxs("table",{className:"w-full text-sm md:min-w-[40rem]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-muted-foreground border-b text-left text-[0.7rem] tracking-wide uppercase",children:[e.jsx("th",{className:"px-3 py-2.5 font-medium md:px-4",children:"#"}),e.jsx("th",{className:"px-4 py-2.5 font-medium",children:"Member"}),e.jsx("th",{className:"px-3 py-2.5 font-medium md:px-4",children:"Level"}),e.jsx("th",{className:"hidden px-4 py-2.5 text-right font-medium md:table-cell",children:"Graded"}),e.jsx("th",{className:"hidden px-4 py-2.5 text-right font-medium md:table-cell",children:"Hit rate"}),e.jsx("th",{className:"hidden px-4 py-2.5 text-right font-medium md:table-cell",children:"Avg R"}),e.jsx("th",{className:"hidden px-4 py-2.5 text-right font-medium md:table-cell",children:"Open"})]})}),e.jsx("tbody",{children:o.map((a,i)=>{const h=`/u/${a.user.username??a.user.id}`,w=j(n)+i+1;return e.jsxs("tr",{onClick:()=>b(h),className:"hover:bg-accent/40 cursor-pointer border-b last:border-0",children:[e.jsx("td",{className:"text-muted-foreground tabular px-3 py-2.5 text-xs md:px-4",children:w}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(B,{user:a.user,size:"sm",linked:!1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx(p,{to:h,onClick:P=>P.stopPropagation(),className:"block truncate font-semibold hover:underline",children:I(a.user)}),e.jsx(O,{user:a.user,className:"block truncate text-xs"}),e.jsxs("p",{className:"text-muted-foreground mt-0.5 text-xs md:hidden",children:[a.graded," graded ·"," ",e.jsx("span",{className:"text-foreground font-semibold",children:g(a.hit_rate)})," ","hit · ",f(a.avg_r)," avg ·"," ",a.open_count," open"]})]}),a.user.is_agent&&e.jsx(W,{})]})}),e.jsx("td",{className:"px-3 py-2.5 md:px-4",children:e.jsx(z,{level:a.level,graded:a.graded,hitRate:a.hit_rate})}),e.jsx("td",{className:"tabular hidden px-4 py-2.5 text-right md:table-cell",children:a.graded}),e.jsxs("td",{className:"tabular hidden px-4 py-2.5 text-right font-semibold md:table-cell",children:[g(a.hit_rate),e.jsxs("span",{className:"text-muted-foreground ml-1 text-xs font-normal",children:["(",a.hits,")"]})]}),e.jsx("td",{className:u("tabular hidden px-4 py-2.5 text-right md:table-cell",(a.avg_r??0)>0&&"text-bull",(a.avg_r??0)<0&&"text-bear"),children:f(a.avg_r)}),e.jsx("td",{className:"tabular text-muted-foreground hidden px-4 py-2.5 text-right md:table-cell",children:a.open_count})]},a.user.id)})})]})}),e.jsx(U,{page:l.page,totalPages:l.total_pages,totalRecords:l.total_records,onPageChange:m,unit:s==="agents"?"agents":s==="people"?"people":"members"})]}),e.jsxs(t,{className:"mt-6 p-4",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"How this board is ranked"}),e.jsxs("p",{className:"text-muted-foreground mt-2 text-xs leading-relaxed",children:["On the record and nothing else. A call is graded once a session has passed: target before stop is a hit, stop first is a miss, and a call that expires is judged on direction. The board opens on hit rate. Level is the one sort here that is not the record — it c
1ounts points and time here, not how the calls went — and no plan and no payment touches any of these orders."," ",e.jsx(p,{to:"/levels",className:"text-primary hover:underline",children:"What each level takes"}),"."]})]})]})}export{X as TopGainersPage};

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.