1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[76],{9698:function(e,t,n){"use strict";var s,o=n(7294);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}t.Z=function(e){return o.createElement("svg",i({width:"1em",height:"1em",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=o.createElement("path",{d:"M1 0h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1Zm17 4.238-7.928 7.1L2 4.216V16h16V4.238ZM2.511 2l7.55 6.662L17.502 2H2.512Z",fill:"#000"})))}},3349:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/forgot-password",function(){return n(2036)}])},2036:function(e,t,n){"use strict";n.r(t);var s=n(5893),o=n(7294),i=n(4871),a=n(4761),l=n(9698),r=n(4202),d=n(9669),u=n.n(d),c=n(9580),m=n(9008),h=n.n(m),v=n(5811);t.default=()=>{let[e,t]=(0,o.useState)(""),[n,d]=(0,o.useState)(!1),[m,p]=(0,o.useState)(""),[w,f]=(0,o.useState)(""),g=async t=>{if(t.preventDefault(),d(!0),f(""),p(""),!e){f("Email field is required"),d(!1);return}try{let t=await (0,r.z)();console.log(t);let n=await u().post(c.z0+"/api/auth/forgot-password",{email:e},{withCredentials:!0});console.log(n.data),p(n.data.message),d(!1)}catch(e){if(console.log(e),(0,v.I)(e)){var n,s,o,i,a,l,m,h,w,g;(null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(s=o.data)||void 0===s?void 0:null===(n=s.errors)||void 0===n?void 0:n.email)?f(null==e?void 0:null===(h=e.response)||void 0===h?void 0:null===(m=h.data)||void 0===m?void 0:null===(l=m.errors)||void 0===l?void 0:l.email[0]):(null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(i=a.data)||void 0===i?void 0:i.message)?f(null==e?void 0:null===(g=e.response)||void 0===g?void 0:null===(w=g.data)||void 0===w?void 0:w.message):f("Whoops, something went wrong")}else f("Whoops, something went wrong");d(!1)}};return(0,s.jsxs)("section",{className:"grow flex flex-col justify-center container",children:[(0,s.jsx)(h(),{children:(0,s.jsx)("title",{children:"Forgot Password | CustomerLift"})}),(0,s.jsxs)("div",{className:"max-w-md mx-auto mb-16",children:[(0,s.jsxs)("header",{className:"text-center",children:[(0,s.jsx)("h1",{className:"mb-4",children:"Forgot Password"}),(0,s.jsx)("p",{children:"Submit the email address associated with your account and we will send you a reset link."})]}),(0,s.jsxs)("form",{onSubmit:g,className:"mt-10",children:[(0,s.jsx)(a.Z,{Svg:l.Z,inputType:"email",label:"EMAIL",value:e,onChange:e=>t(e.currentTarget.value),errorMsg:w,inputName:"email",placeholder:"[email protected]"}),(0,s.jsx)(i.Z,{isLoading:n,type:"submit",myClasses:"mt-12",children:"Submit"}),(0,s.jsx)("p",{className:"text-green-500 mt-7 text-center",children:m})]})]})]})}},9008:function(e,t,n){e.exports=n(7828)}},function(e){e.O(0,[888,774,179],function(){return e(e.s=3349)}),_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.