PageSourceSearch

https://elitevolleyball.training/assets/join-invite-DvJVAf8H.js

js elitevolleyball.training collected 2026-09-24 15:13:37 UTC 2,586 bytes, 1 lines download raw bytes

1import{c as u,b as f,r as n,j as e,f as h,g,h as j,z as p,i as v,a8 as y,y as N,B as r,al as C,an as w}from"./index-DKbmQBBZ.js";import{V as b}from"./volleyball-2s8ROQjy.js";function L(){const d=u(),[,l]=f(),[s,a]=n.useState(null),[o,c]=n.useState(!0),i=new URLSearchParams(d).get("token")??"";return n.useEffect(()=>{let t=!1;async function m(){if(!i){a({valid:!1,message:"No invitation token found."}),c(!1);return}try{const x=await(await fetch(`/api/email-invite/verify?token=${encodeURIComponent(i)}`)).json();t||a(x)}catch{t||a({valid:!1,message:"Could not verify this invitation."})}finally{t||c(!1)}}return m(),()=>{t=!0}},[i]),e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted/30 p-4",children:e.jsxs(h,{className:"w-full max-w-md","data-testid":"card-join",children:[e.jsxs(g,{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-2 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:e.jsx(b,{className:"h-6 w-6 text-primary"})}),e.jsx(j,{className:"text-2xl",children:"You're invited!"}),e.jsx(p,{children:"Join Elite Volleyball Academy"})]}),e.jsx(v,{className:"space-y-4",children:o?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-muted-foreground","data-testid":"state-loading",children:[e.jsx(y,{className:"h-5 w-5 animate-spin"})," Checking your invitation…"]}):s?.valid?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-center text-sm text-muted-foreground","data-testid":"text-greeting",children:[s.firstName?`Hi ${s.firstName}! `:"","Create your account to get started."]}),s.inviteType==="EVENT"&&(s.events?.length??0)>0?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[e.jsx(N,{className:"h-4 w-4"})," Register for:"]}),s.events.map(t=>e.jsxs(r,{className:"w-full justify-start",onClick:()=>l(`/events/${t.id}/register`),"data-testid":`button-register-event-${t.id}`,children:[e.jsx(C,{className:"mr-2 h-4 w-4"})," ",t.name]},t.id))]}):e.jsx(r,{className:"w-full",onClick:()=>{window.location.href="/api/login"},"data-testid":"button-get-started",children:"Get started"})]}):e.jsxs("div",{className:"flex flex-col items-center gap-3 py-4 text-center","data-testid":"state-invalid",children:[e.jsx(w,{className:"h-8 w-8 text-amber-500"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s?.message??"This invitation is no longer valid."}),e.jsx(r,{variant:"outline",onClick:()=>l("/"),"data-testid":"button-home",children:"Go to home"})]})})]})})}export{L 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.