PageSourceSearch

https://nafsaihub.vercel.app/assets/BadgesPage-CuYZwHag.js

js nafsaihub.vercel.app collected 2026-10-03 07:22:00 UTC 6,077 bytes, 1 lines download raw bytes

1import{h as g,r as c,j as e,x,y as m,T as h,F as y,D as u,E as f}from"./index-CjdkaYYI.js";const j=[{type:"Newcomer",name:"Newcomer",need:0,description:"Welcome to the community!"},{type:"Influencer",name:"Rising Influencer",need:5,description:"Refer 5 users"},{type:"NetworkMaster",name:"Network Master",need:10,description:"Refer 10 users"},{type:"CommunityLeader",name:"Community Leader",need:25,description:"Refer 25 users"},{type:"ReferralLegend",name:"Referral Legend",need:50,description:"Refer 50 users"},{type:"SuperConnector",name:"Super Connector",need:100,description:"Refer 100 users"},{type:"Ultimate Networker",name:"Ultimate Networker",need:200,description:"Refer 200 users"}],N=[{key:"DailyExplorer",name:"Daily Explorer",description:"Use tools for 5 consecutive days",progress:s=>Math.min(s.dayStreak/5,1)},{key:"WeeklyChampion",name:"Weekly Champion",description:"Use tools every day for a week",progress:s=>Math.min(s.dayStreak/7,1)},{key:"ConsistentLearner",name:"Consistent Learner",description:"Use tools daily for a month",progress:s=>Math.min(s.dayStreak/30,1)},{key:"AIDevotee",name:"AI Devotee",description:"Use tools daily for 90 days",progress:s=>Math.min(s.dayStreak/90,1)},{key:"AIApprentice",name:"AI Apprentice",description:"Use 8 different tools",progress:s=>Math.min(s.totalTools/8,1)},{key:"ToolCollector",name:"Tool Collector",description:"Use 20 different tools",progress:s=>Math.min(s.totalTools/20,1)},{key:"InnovationSeeker",name:"Innovation Seeker",description:"Use 35 different tools",progress:s=>Math.min(s.totalTools/35,1)},{key:"AIVirtuoso",name:"AI Virtuoso",description:"Use 50 different tools",progress:s=>Math.min(s.totalTools/50,1)},{key:"TechPioneer",name:"Tech Pioneer",description:"Use 70 different tools",progress:s=>Math.min(s.totalTools/70,1)},{key:"AIVanguard",name:"AI Vanguard",description:"Use 85 different tools",progress:s=>Math.min(s.totalTools/85,1)},{key:"ToolOptimizer",name:"Tool Optimizer",description:"Use a single tool 50 times",progress:s=>Math.min(s.maxToolUses/50,1)}],l=({title:s,description:o,imageUrl:d,unlockedAt:a,progressPct:n})=>e.jsxs("div",{className:"group relative bg-gray-800/70 border border-white/10 p-4 rounded-xl hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 hover:-translate-y-1",children:[e.jsx("div",{className:"absolute inset-0 rounded-xl pointer-events-none bg-gradient-to-tr from-transparent via-transparent to-white/5 opacity-0 group-hover:opacity-100 transition-opacity"}),d&&e.jsx("img",{src:d,alt:s,className:"w-16 h-16 mb-2 drop-shadow"}),e.jsx("h3",{className:"font-semibold text-slate-100",children:s}),e.jsx("p",{className:"text-sm text-slate-400",children:o}),a&&e.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["Unlocked: ",e.jsx("span",{className:"text-slate-200",children:new Date(a).toLocaleDateString()})]}),n!==void 0&&e.jsxs("div",{className:"mt-3",children:[e.jsx("div",{className:"w-full bg-gray-700/70 rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-primary to-cyan-400 h-2 rounded-full transition-all duration-700",style:{width:`${Math.round(n*100)}%`}})}),e.jsxs("p",{className:"text-xs text-slate-300 mt-1",children:[Math.round(n*100),"%"]})]})]}),w=()=>{const{currentUser:s}=g(),[o,d]=c.useState(null),[a,n]=c.useState(null);c.useEffect(()=>{(async()=>{if(!s)return;const[r,i]=await Promise.all([u(s.uid),f(s.uid)]);d(r),n(i)})()},[s]);const p=j.map(t=>{const r=(o==null?void 0:o.referralsCount)??0,i=t.need===0?1:Math.max(0,Math.min(1,r/t.need));return{title:t.name,description:`${t.description} (${r}/${t.need})`,progressPct:i}});return e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10 space-y-10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold tracking-tight flex items-center gap-2 text-light",children:[e.jsx(x,{className:"w-6 h-6 text-accent"})," All Badges & Progress"]}),e.jsx("p",{className:"text-light/80 mt-2",children:"See how to earn every badge and track your progress."})]}),e.jsxs("div",{className:"hidden md:flex items-center gap-2 text-xs bg-secondary/30 text-light border border-secondary/50 px-3 py-1 rounded-full",children:[e.jsx(m,{className:"w-4 h-4"})," Gamified journey"]})]}),e.jsxs("section",{className:"space-y-4 rounded-xl border border-secondary/40 bg-gradient-to-r from-primary/30 to-secondary/40 p-6 shadow-lg shadow-accent/10",children:[e.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-2 text-light",children:[e.jsx(m,{className:"w-5 h-5 text-accent"})," Referral Badges"]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:p.map((t,r)=>
1e.jsx(l,{title:t.title,description:t.description,progressPct:t.progressPct},r))})]}),e.jsxs("section",{className:"space-y-4 rounded-xl border border-secondary/40 bg-gradient-to-r from-primary/30 to-secondary/40 p-6 shadow-lg shadow-accent/10",children:[e.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-2 text-light",children:[e.jsx(h,{className:"w-5 h-5 text-accent"})," Tool Usage Badges"]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:N.map((t,r)=>{const i=a?t.progress(a):0;return e.jsx(l,{title:t.name,description:t.description,progressPct:i},r)})})]}),e.jsxs("section",{className:"space-y-4 rounded-xl border border-secondary/40 bg-gradient-to-r from-primary/30 to-secondary/40 p-6 shadow-lg shadow-accent/10",children:[e.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-2 text-light",children:[e.jsx(y,{className:"w-5 h-5 text-accent"})," Unlocked Badges"]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:[((o==null?void 0:o.badges)||[]).map((t,r)=>e.jsx(l,{title:t.name,description:t.description,imageUrl:t.imageUrl,unlockedAt:t.unlockedAt},`r-${r}`)),((a==null?void 0:a.badges)||[]).map((t,r)=>e.jsx(l,{title:t.name,description:t.description,imageUrl:t.imageUrl,unlockedAt:t.unlockedAt},`t-${r}`))]})]})]})};export{w 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.