1import{u as c,r as t,j as e,A as l,s as m,t as n}from"./index-TEYDgzc9.js";import{B as f}from"./button-BsCs1ivO.js";import{I as w}from"./input-M3zv3vVl.js";import{L as h}from"./label-CK_KAD9J.js";function b(){const u=c(),[a,i]=t.useState(""),[d,r]=t.useState(!1);t.useEffect(()=>{typeof window<"u"&&window.location.hash.includes("type=recovery"),r(!0)},[]);const p=async s=>{s.preventDefault();const{error:o}=await m.auth.updateUser({password:a});if(o)return n.error(o.message);n.success("Password updated"),u({to:"/dashboard"})};return e.jsx(l,{title:"Set a new password",children:d&&e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(h,{children:"New password"}),e.jsx(w,{type:"password",required:!0,minLength:6,value:a,onChange:s=>i(s.target.value)})]}),e.jsx(f,{type:"submit",variant:"navy",className:"w-full h-11",children:"Update password"})]})})}export{b as component};
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.