PageSourceSearch

https://ernest.lovable.app/assets/ForgotPasswordPage-CxMwdFZS.js

js ernest.lovable.app collected 2026-10-03 03:30:48 UTC 2,263 bytes, 2 lines download raw bytes

1import{r,aI as p,j as e,aJ as f,L as g,I as A,B as j,v as y,s as n}from"./index-Ge9d8XRR.js";const b=()=>{const[t,c]=r.useState(""),[o,s]=r.useState(!1),[d,m]=r.useState(!1),{toast:i}=p(),u=async a=>{a.preventDefault(),s(!0);const{data:x,error:h}=await n.rpc("email_is_registered",{_email:t});if(!h&&x===!1){s(!1),i({title:"No account found",description:"We couldn't find an account with this email. Check the spelling or try another address.",variant:"destructive"});return}const{error:l}=await n.auth.resetPasswordForEmail(t,{redirectTo:`${window.location.origin}/reset-password`});s(!1),l?i({title:"Error",description:l.message,variant:"destructive"}):m(!0)};return e.jsx(f,{tagline:"Reset your password and get back to your communities.",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"font-semibold tracking-tight text-2xl text-[#0A0A0A] text-left",children:"Reset your password"}),e.jsx("p",{className:"mt-2 text-sm text-[#666] text-left",children:"Enter your email and we'll send you a link to reset your password. Check your spam folder!"})]}),d?e.jsxs("div",{className:"rounded-lg border border-[#E5E5E5] bg-[#F9F9F9] p-4 text-center",children:[e.jsx("p",{className:"text-sm text-[#0A0A0A] font-medium",children:"Check your inbox"}),e.jsxs("p",{className:"mt-1 text-sm text-[#666]",children:["We've sent a password reset link to ",e.jsx("strong",{children:t}),"."]})]}):e.jsxs("form",{onSubmit:u,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{htmlFor:"email",className:"text-sm text-[#0A0A0A]",children:"Email"}),e.jsx(A,{id:"email",type:"email",placeholder:"[email protected]",value:t,onChange:a=>c(a.target.value),required:!0,className:"h-11 border-[#E5E5E5] bg-white text-[#0A0A0A] placeholder:text-[#999]"})]}),e.jsx(j,{type:"submit",disabled:o,className:"w-full h-11 bg-[#0A0A0A] text-white hover:bg-[#1A1A1A] text-sm font-medium",children:o?"Sending…":"Send reset link"})]}),e.jsx("p",{className:"text-sm text-[#666] text-left",children:e.jsx(y,{to:"/login",className:"font-medium hover:underline text-[#584dff]",children:"← Back to login"})})]})})};export{b as default};
2//# sourceMappingURL=ForgotPasswordPage-CxMwdFZS.js.map

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.