PageSourceSearch

https://playspectrum.space/_next/static/chunks/app/history/page-ec4347b9054c752d.js

js playspectrum.space collected 2026-10-07 06:06:22 UTC 7,010 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[811],{1404:function(e,t,r){Promise.resolve().then(r.bind(r,1184))},1695:function(e,t,r){"use strict";var n=r(1219);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},1184:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return i}});var n=r(7573),s=r(9585),a=r(5118),c=r(6478),l=r(9801),o=r(8146);function i(){let{walletAddress:e}=(0,c.O)(),[t,r]=(0,s.useState)([]),[i,u]=(0,s.useState)(!0),[x,d]=(0,s.useState)(0),m=(0,s.useCallback)(async()=>{u(!0);try{let t=await (0,a.hi)("/races/history?limit=".concat(20,"&offset=").concat(x).concat(e?"&wallet=".concat(encodeURIComponent(e)):""));r(t.races)}catch(e){}finally{u(!1)}},[x,e]);return(0,s.useEffect)(()=>{m()},[m]),(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsx)(l.F,{}),(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"broadcast-label text-spectrum-amber mb-1",children:"RACE ARCHIVE"}),(0,n.jsx)("h1",{className:"font-heading text-2xl font-bold tracking-tight",children:"Race History"})]})}),i?(0,n.jsx)("div",{className:"text-center text-gray-400 py-8",children:"Loading..."}):0===t.length?(0,n.jsx)("div",{className:"text-center text-gray-500 py-8",children:"No settled races yet."}):(0,n.jsx)("div",{className:"rounded-lg border border-spectrum-border bg-spectrum-panel/50 overflow-hidden overflow-x-auto",children:(0,n.jsxs)("table",{className:"w-full text-sm",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"border-b border-spectrum-border text-xs text-gray-500",children:[(0,n.jsx)("th",{className:"px-3 py-2 text-left",children:"#"}),(0,n.jsx)("th",{className:"px-3 py-2 text-left",children:"Type"}),(0,n.jsx)("th",{className:"px-3 py-2 text-left",children:"Settled"}),(0,n.jsx)("th",{className:"px-3 py-2 text-right",children:"Entries"}),(0,n.jsx)("th",{className:"px-3 py-2 text-right",children:"Up"}),(0,n.jsx)("th",{className:"px-3 py-2 text-right",children:"Down"}),(0,n.jsx)("th",{className:"px-3 py-2 text-right",children:"Index"}),(0,n.jsx)("th",{className:"px-3 py-2 text-left",children:"You"}),(0,n.jsx)("th",{className:"px-3 py-2"})]})}),(0,n.jsx)("tbody",{children:t.map(e=>{let t=e.movementSummary,r=e.participated;return(0,n.jsxs)("tr",{className:"border-b border-spectrum-border/50 hover:bg-spectrum-panel ".concat(r?"bg-green-500/5":""),children:[(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-gray-400",children:(0,n.jsxs)(o.default,{href:"/races/".concat(e.id),className:"hover:underline",children:["#",e.raceNumber]})}),(0,n.jsx)("td",{className:"px-3 py-2",children:(0,n.jsx)(o.default,{href:"/races/".concat(e.id),className:"hover:underline",children:(0,n.jsx)("span",{className:"ultra"===e.type?"text-purple-400":"text-cyan-400",children:e.type})})}),(0,n.jsx)("td",{className:"px-3 py-2 text-gray-400 text-xs",children:new Date(e.settleTime).toLocaleString()}),(0,n.jsx)("td",{className:"px-3 py-2 text-right text-gray-400",children:e.entryCount}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono text-xs text-green-400",children:t.upCount}),(0,n.jsx)("td",{className:"px-3 py-2 text-right font-mono text-xs text-red-400",children:t.downCount}),(0,n.jsxs)("td",{className:"px-3 py-2 text-right font-mono text-xs ".concat(t.compositeReturnPct>=0?"text-green-400":"text-red-400"),children:[t.compositeReturnPct>=0?"+":"",t.compositeReturnPct.toFixed(3),"%"]}),(0,n.jsx)("td",{className:"px-3 py-2",children:r?(0,n.jsx)("span",{className:"inline-flex rounded border border-green-500/30 bg-green-500/10 px-2 py-0.5 text-[11px] font-medium text-green-400",children:e.myEntryCount>1?"".concat(e.myEntryCount," entries"):"Your entry"}):(0,n.jsx)("span",{className:"text-xs text-gray-600",children:"-"})}),(0,n.jsx)("td",{className:"px-3 py-2",children:(0,n.jsx)(o.default,{href:"/races/".concat(e.id),className:"text-xs text-spectrum-accent hover:underline",children:"View"})})]},e.id)})})]})}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("button",{onClick:()=>d(Math.max(0,x-20)),disabled:0===x,className:"btn-secondary",children:"Previous"}),(0,n.jsxs)("span",{className:"text-xs text-gray-500 font-data",children:["Page ",Math.floor(x/20)+1]}),(0,n.jsx)("button",{onClick:()=>d(x+20),disabled:t.length<20,className:"btn-secondary",children:"Next"})]})]})}},9801:function(e,t,r){"use strict";r.d(t,{F:function(){return x}});var n=r(7573),s=r(8146),a=r(1695),c=r(6478),l=r(9147);let o=[{href:"/lobby",label:"Lobby",requiresAuth:!0,accent:"accent"}
1,{href:"/bounty",label:"Bounty",requiresAuth:!1,accent:"gold"},{href:"/races/live",label:"Live",requiresAuth:!1,accent:"amber"},{href:"/history",label:"History",requiresAuth:!1,accent:"ion"}],i={accent:"bg-spectrum-accent",amber:"bg-spectrum-amber",ion:"bg-spectrum-ion",gold:"bg-spectrum-gold"},u={accent:"text-spectrum-accent",amber:"text-spectrum-amber",ion:"text-spectrum-ion",gold:"text-spectrum-gold"};function x(){let e=(0,a.usePathname)(),{pilot:t}=(0,c.O)(),r=t=>e===t||"/"!==t&&(null==e?void 0:e.startsWith(t));return(0,n.jsx)("div",{className:"flex items-center gap-1 border-b border-spectrum-border/50 pb-px",children:o.map(e=>{let a=e.requiresAuth&&!t,c=r(e.href);return(0,n.jsxs)(s.default,{href:a?"#":e.href,"aria-disabled":a,onClick:e=>{a&&e.preventDefault()},className:(0,l.cn)("relative px-4 py-2 text-sm font-medium transition-colors rounded-t-md",c&&!a?(0,l.cn)("text-gray-100 bg-spectrum-panel/60",u[e.accent]):a?"text-gray-700 cursor-not-allowed":"text-gray-500 hover:text-gray-300 hover:bg-spectrum-panel/30"),children:[e.label,c&&!a&&(0,n.jsx)("span",{className:(0,l.cn)("absolute -bottom-px left-0 right-0 h-0.5 rounded-full",i[e.accent])}),a&&(0,n.jsx)("span",{className:"ml-1 text-[8px] text-gray-700 normal-case",children:"lock"})]},e.href)})})}},9147:function(e,t,r){"use strict";r.d(t,{D:function(){return l},Yd:function(){return i},cn:function(){return a},gW:function(){return c},pn:function(){return o}});var n=r(607),s=r(5579);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m6)((0,n.W)(t))}function c(e){return null==e?"--":Number(e).toLocaleString()}function l(e){return null==e?"--":new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}).format(e)}function o(e){if(null==e||!Number.isFinite(e)||e<0)return"--";if(e<10)return String(Math.floor(e));if(e<1e3)return"".concat(10*Math.floor(e/10),"+");let t=(100*Math.floor(e/100)/1e3).toFixed(1).replace(/\.0$/,"");return"".concat(t,"k+")}function i(e){return e?String(e).split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):"--"}}},function(e){e.O(0,[608,451,340,443,655,118,786,293,528,744],function(){return e(e.s=1404)}),_N_E=e.O()}]);

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.