PageSourceSearch

https://www.speak.social/assets/RegisterPage-D-C8pL2b.js

js speak.social collected 2026-10-02 17:42:12 UTC 4,554 bytes, 1 lines download raw bytes

1import{P as y,r as a,j as s,L as n,b as m}from"./index-DcW9V1Fn.js";/* empty css                  */const P=l=>l instanceof Error&&l.message?l.message:"Registration failed. Please try again.",S=()=>s.jsxs("section",{className:"sp-login__story","aria-label":"About speak",children:[s.jsx("span",{className:"sp-login__shape sp-login__shape--one"}),s.jsx("span",{className:"sp-login__shape sp-login__shape--two"}),s.jsx("span",{className:"sp-login__word sp-login__word--labas",children:"LABAS"}),s.jsx("span",{className:"sp-login__word sp-login__word--hello",children:"HELLO"}),s.jsx(n,{to:"/",className:"sp-login__brand","aria-label":"SPEAK.social home",children:s.jsx(m,{className:"sp-login__logo"})}),s.jsxs("div",{className:"sp-login__story-copy",children:[s.jsx("span",{className:"sp-login__kicker",children:"Language groups. Local communities."}),s.jsxs("h2",{children:["Learn the local language. ",s.jsx("em",{children:"Take part locally."})]}),s.jsx("p",{children:"SPEAK brings migrants and local residents together through volunteer-led language groups."})]}),s.jsxs("div",{className:"sp-login__hours sp-register__pilot",children:[s.jsx("strong",{children:"Pilot in Lithuania"}),s.jsx("span",{children:"Create an account to join available groups and activities."})]})]}),C=()=>s.jsx(n,{to:"/",className:"sp-login__mobile-brand","aria-label":"SPEAK.social home",children:s.jsx(m,{className:"sp-login__logo"})}),A=()=>{const l=y(e=>e.register),[i,h]=a.useState(""),[t,_]=a.useState(""),[r,x]=a.useState(""),[c,j]=a.useState(""),[d,o]=a.useState(""),[p,u]=a.useState(!1),[N,f]=a.useState(!1),w=()=>i.trim().length<2?"Please enter your full name.":r.length<8?"Password must be at least 8 characters.":r!==c?"Passwords do not match.":null,v=async e=>{e.preventDefault(),o("");const g=w();if(g){o(g);return}u(!0);try{await l(t,r,i.trim()),f(!0)}catch(b){o(P(b))}finally{u(!1)}};return s.jsxs("main",{className:"sp-login sp-register",children:[s.jsx(S,{}),s.jsxs("section",{className:"sp-login__panel",children:[s.jsx("span",{className:"sp-login__panel-shape sp-login__panel-shape--one"}),s.jsx("span",{className:"sp-login__panel-shape sp-login__panel-shape--two"}),s.jsxs("div",{className:"sp-login__card",children:[s.jsx(C,{}),N?s.jsxs("div",{className:"sp-register__success",role:"status",children:[s.jsx("span",{className:"sp-login__eyebrow",children:"Account created"}),s.jsx("h1",{children:"You're registered."}),s.jsx("p",{className:"sp-login__intro",children:"Your account is ready. You can now log in."}),s.jsx(n,{to:"/auth/login",className:"sp-login__submit sp-register__submit-link",children:"Log in"})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sp-login__eyebrow",children:"Create your account"}),s.jsx("h1",{children:"Join SPEAK."}),s.jsx("p",{className:"sp-login__intro",children:"Enter your details to get started."}),d&&s.jsx("div",{className:"sp-login__error",role:"alert",children:d}),s.jsxs("form",{className:"sp-login__form",onSubmit:v,children:[s.jsxs("div",{className:"sp-login__field",children:[s.jsx("label",{htmlFor:"fullName",children:"Full name"}),s.jsx("input",{id:"fullName",type:"text",autoComplete:"name",placeholder:"Your full name",value:i,onChange:e=>h(e.target.value),required:!0})]}),s.jsxs("div",{className:"sp-login__field",children:[s.jsx("label",{htmlFor:"email",children:"Email"}),s.jsx("input",{id:"email",type:"email",autoComplete:"email",placeholder:"[email protected]",value:t,onChange:e=>_(e.target.value),required:!0})]}),s.jsxs("div",{className:"sp-login__field",children:[s.jsx("label",{htmlFor:"password",children:"Password"}),s.jsx("input",{id:"password",type:"password",autoComplete:"new-password",placeholder:"At least 8 characters",value:r,onChange:e=>x(e.target.value),required:!0,minLength:8})]}),s.jsxs("div",{className:"sp-login__field",children:[s.jsx("label",{htmlFor:"confirmPassword",children:"Confirm password"}),s.jsx("input",{id:"confirmPassword",type:"password",autoComplete:"new-password",placeholder:"Re-enter your password",value:c,onChange:e=>j(e.target.value),required:!0})]}),s.jsx("button",{type:"submit",className:"sp-login__submit",disabled:p,children:p?"Creating account…":"Create account"})]}),s.jsxs("div",{className:"sp-register__links",children:[s.jsxs("p",{className:"sp-login__signup",children:["Already have an account? ",s.jsx(n,{to:"/auth/login",children:"Log in"})]}),s.jsxs("p",{className:"sp-login__signup",children:["Registering a venue?"," ",s.jsx(n,{to:"/auth/register/venue",children:"Register as a venue"})]})]})]})]})]})]})};export{A 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.