PageSourceSearch

https://langbuddy.ai/_next/static/chunks/pages/dashboard/rewards-e826126677fd836d.js

js langbuddy.ai collected 2026-10-05 12:10:32 UTC 6,320 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2841],{92450:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/rewards",function(){return s(46767)}])},46767:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return y},default:function(){return k}});var a=s(85893),n=s(9008),r=s.n(n),i=s(67294),d=s(33299),o=s(49079),l=s(81526),c=s(43844),x=s(62190),h=s(90512),f=s(98388);function m(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,f.m6)((0,h.W)(t))}let u=c.fC,p=c.xz,g=c.h_;c.x8;let j=i.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(c.aV,{ref:t,className:m("fixed inset-0 z-[1000] bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n})});j.displayName=c.aV.displayName;let N=i.forwardRef((e,t)=>{let{className:s,children:n,...r}=e;return(0,a.jsxs)(g,{children:[(0,a.jsx)(j,{}),(0,a.jsxs)(c.VY,{ref:t,className:m("fixed left-[50%] top-[50%] z-[100000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...r,children:[n,(0,a.jsxs)(c.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});N.displayName=c.VY.displayName;let b=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};b.displayName="DialogHeader";let w=i.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(c.Dx,{ref:t,className:m("text-lg font-semibold leading-none tracking-tight",s),...n})});w.displayName=c.Dx.displayName;let v=i.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(c.dk,{ref:t,className:m("text-sm text-muted-foreground",s),...n})});v.displayName=c.dk.displayName;var y=!0;function k(){let{data:e,status:t}=(0,d.useSession)(),[s,n]=(0,i.useState)(0),[c,x]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{let t=async()=>{try{x(!0);let e=await fetch("/api/auth/rewardPoints"),t=await e.json();n(t.points)}catch(e){console.error("Error fetching points:",e)}finally{x(!1)}};e&&t()},[e]),"loading"===t)?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,a.jsx)("p",{className:"text-2xl font-bold",children:"Loading..."})}):"unauthenticated"===t?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,a.jsx)("p",{className:"text-2xl font-bold",children:"You are not logged in!"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r(),{children:(0,a.jsx)("title",{children:"LangBuddy Rewards"})}),(0,a.jsxs)(o.Z,{navbar:!0,jumbotron:!1,parent:{title:"Explore",href:"/dashboard/explore"},children:[(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)(l.Tg,{className:"p-8 text-center bg-indigo-600 border-indigo-600 shadow-funnel-cta",children:[(0,a.jsx)("h1",{className:"text-xl font-bold mb-2 text-white",children:"Your Points Balance"}),c?(0,a.jsx)("div",{className:"flex justify-center items-center h-16",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-white"})}):(0,a.jsx)("div",{className:"text-5xl font-bold mb-2 text-white",children:s}),(0,a.jsx)("p",{className:"text-indigo-100 text-sm",children:"Points earned"})]}),(0,a.jsxs)(u,{children:[(0,a.jsx)(p,{className:"w-full p-4 bg-white rounded-2xl shadow-funnel-card border border-stone-200 hover:border-indigo-200 transition-all active:scale-[.98]",children:(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("svg",{className:"w-6 h-6 text-indigo-600 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsx)("span",{className:"text-sm font-medium text-stone-900",children:"How to Earn Points"})]})}),(0,a.jsxs)(N,{children:[(0,a.jsxs)(b,{children:[(0,a.jsx)(w,{children:"How to Earn Points"}),(0,a.jsx)(v,{children:"Share LangBuddy with friends to earn points."})]}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsxs)("div",{className:"flex items-center p-4 bg-indigo-50 rounded-lg",children:[(0,a.jsx)("div",{className:"mr-4",children:(0,a.jsx)("div",{className:"p-2 bg-indigo-100 rounded-full",children:(0,a.jsx)("svg",{className:"w-5 h-5 text-indigo-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})})})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold",children:"Invite Friends"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:"500 points per referral"})]})]})})]})]}),(0,a.jsxs)(l.Tg,{className:"p-5 bg-indigo-600 border-indigo-600 shadow-funnel-cta",children:[(0,a.jsx)("h2",{className:"font-bold text-lg mb-1 text-white",children:"Invite Friends & Earn More"}),(0,a.jsx)("p",{className:"text-sm mb-4 text-indigo-100",children:"Get 500 points for each friend who joins"}),(0,a.jsx)(l.zx,{href:"/dashboard/invite",variant:"secondary",fullWidth:!0,children:"Share Your Invite Link"})]})]}),(0,a.jsxs)("footer",{className:"text-center text-xs text-stone-400 pb-4",children:["\xa9 ",new Date().getFullYear()," LangBuddy.ai"]})]})]})}}},function(e){e.O(0,[2549,3934,8159,3844,7283,6123,1526,2888,9774,179],function(){return e(e.s=92450)}),_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.