PageSourceSearch

https://iotrader.io/assets/RewardsHub-rrvO4WTz.js

js iotrader.io collected 2026-10-07 02:29:31 UTC 4,828 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-trading-D1p3lq87.js";import{r as a}from"./vendor-icons-6ckh54d_.js";import{L as j}from"./Layout-CUsvgNIy.js";import{P as N}from"./PageSEO-D5QLkR79.js";import{I as T}from"./Icon-DjBwmRGQ.js";import{D as v,W as E}from"./home2-CFGPzgUz.js";import{P as r,t as S,D as R}from"./App-DuU1U4az.js";import{L as x}from"./vendor-react-DQUjuWkt.js";import"./vendor-firebase-BholX5ft.js";import"./OrderlyConnect-D8NMU3_e.js";import"./vendor-web3-BzpTdpCw.js";import"./SiteHeader-BuEhw28K.js";const f=[{id:"referral",title:"Invite friends",description:"Share your referral link and earn when new wallets join.",points:r.REFERRAL_BONUS,href:"/earn/referral",icon:"Users",claimKey:null},{id:"twitter_share",title:"Share on X",description:"Post about IO Trader and claim share points.",points:r.TWITTER_SHARE,href:"/share/twitter",icon:"Twitter",claimKey:"twitter_share"},{id:"telegram_share",title:"Share on Telegram",description:"Share IO Trader with your Telegram community.",points:r.TELEGRAM_SHARE,href:"/share/telegram",icon:"Send",claimKey:"telegram_share"},{id:"twitter_follow",title:"Follow on X",description:"Follow the official IO Trader account.",points:r.TWITTER_FOLLOW,href:"/earn/follow/twitter",icon:"Twitter",claimKey:"twitter_follow"},{id:"telegram_join",title:"Join Telegram",description:"Join the official IO Trader Telegram channel.",points:r.TELEGRAM_JOIN,href:"/earn/follow/telegram",icon:"Send",claimKey:"telegram_join"},{id:"trade",title:"Trade futures",description:"Earn points when you trade perpetual futures.",points:r.PREDICTION_TRADE,href:"/market",icon:"Activity",claimKey:null}],F=()=>{const{isConnected:i,address:s}=v(),[h,c]=a.useState(!1),[u,d]=a.useState(0),[w,m]=a.useState({}),[y,p]=a.useState(!1);return a.useEffect(()=>{if(!i||!s){d(0),m({});return}let t=!1;return(async()=>{p(!0);try{const n=await S(s),b=await Promise.all(f.filter(l=>l.claimKey).map(async l=>{const g=await R(s,l.claimKey);return[l.claimKey,g]}));t||(d(n),m(Object.fromEntries(b)))}catch(n){console.error("Rewards Hub load error:",n)}finally{t||p(!1)}})(),()=>{t=!0}},[i,s]),e.jsxs(j,{activePage:"earn-rewards",children:[e.jsx(N,{}),e.jsx("div",{className:"min-h-screen pt-6 pb-20 px-4 lg:px-6",children:e.jsxs("div",{className:"max-w-5xl mx-auto",children:[e.jsxs("div",{className:"mb-8 animate-fade-in-up",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-black text-white mb-2",children:"Rewards Hub"}),e.jsx("p",{className:"text-gray-400 text-sm md:text-base",children:"Claim generous rewards by completing tasks on IO Trader."})]}),e.jsxs("div",{className:"rounded-xl border border-white/10 bg-[#0a0a0a] p-5 mb-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4 animate-fade-in-up",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-400 text-sm",children:"My total Points"}),e.jsx("p",{className:"text-3xl font-black text-[var(--color-accent-primary)]",children:i?y?"—":u.toLocaleString():"—"})]}),e.jsx("div",{className:"flex flex-wrap gap-3",children:i?e.jsx(x,{to:"/leaderboard",className:"inline-flex items-center gap-2 rounded-lg border border-white/20 px-4 py-2.5 text-sm font-semibold text-white hover:border-[var(--color-accent-primary)]/50 transition-colors",children:"View History"}):e.jsx("button",{type:"button",onClick:()=>c(!0),className:"btn-primary-accent px-6 py-2.5 text-sm",children:"Connect Wallet"})})]}),e.jsx("div",{className:"space-y-3 animate-fade-in-up",children:f.map(t=>{const o=t.claimKey?w[t.claimKey]:!1;return e.jsxs("div",{className:"rounded-xl border border-white/10 bg-[#0a0a0a] p-5 flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"h-10 w-10 rounded-full border border-white/15 bg-white/5 flex items-center justify-center shrink-0",children:e.jsx(T,{name:t.icon,size:18,className:"text-[var(--color-accent-primary)]"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"text-white font-bold",children:t.title}),o&&e.jsx("span",{className:"text-[10px] uppercase tracking-wide font-bold text-emerald-400 bg-emerald-400/10 px-2 py-0.5 rounded-full",children:"Claimed"})]}),e.jsx("p",{className:"text-gray-400 text-sm mt-0.5",children:t.description}),e.jsxs("p",{className:"text-[var(--color-accent-primary)] text-xs font-bold mt-1",children:["+",t.points," pts",t.id==="trade"?" per trade":""]})]})]}),e.jsx(x,{to:t.href,className:"inline-flex items-center justify-center rounded-lg bg-[var(--color-accent-primary)] hover:bg-[var(--color-accent-primary-hover)] text-black font-bold px-5 py-2.5 text-sm transition-colors shrink-0",children:o&&t.claimKey?"View":"Start"})]},t.id)})})]})}),e.jsx(E,{isOpen:h,onClose:()=>c(!1)})]})};export{F 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.