PageSourceSearch

https://us.zoie.ai/assets/VerifyOtp-DDcQ_Jdz.js

js zoie.ai collected 2026-10-05 14:20:29 UTC 2,507 bytes, 1 lines download raw bytes

1import{e as t,F as O}from"./index-C3mDJt84.js";import{s as w,r as o,F as d,B as j,I as B,T as E}from"./vendor-antd-Dp-wSBmF.js";import{a as v}from"./vendor-network-vEC1ZpqK.js";import{b as W}from"./vendor-react-B8SZ4TuU.js";const V=({userEmailId:n,setuserEmailId:z,setuserOtp:h})=>{const u=W(),[y,F]=w.useNotification(),[i,I]=o.useState(1),[c,x]=o.useState(50),[S,T]=o.useState(!1),[f,N]=o.useState(),[b]=d.useForm(),g=e=>e<10?`0${e}`:e,r=(e,s,a)=>{y[e]({message:s,description:a})},k=()=>{let e={email:n};v.post("https://api-us.zoie.ai/api/v1/auth/send-otp",e).then(s=>{var a;r("success","Success",(a=s==null?void 0:s.data)==null?void 0:a.message)}).catch(s=>{var a,l,m,p;r("error","Error",((l=(a=s==null?void 0:s.response)==null?void 0:a.data)==null?void 0:l.message)||((p=(m=s==null?void 0:s.response)==null?void 0:m.data)==null?void 0:p.error)||(s==null?void 0:s.message))})},C=()=>{let e={email:n,otp:f};v.post("https://api-us.zoie.ai/api/v1/auth/verify-otp",e).then(s=>{r("success","Success","OTP verified successfully"),h&&h(f),u("/reset-password")}).catch(s=>{var a,l,m,p;r("error","Error",((l=(a=s==null?void 0:s.response)==null?void 0:a.data)==null?void 0:l.message)||((p=(m=s==null?void 0:s.response)==null?void 0:m.data)==null?void 0:p.error)||(s==null?void 0:s.message))})};return o.useEffect(()=>{n||u("/forgot-password",{replace:!0})},[n,u]),o.useEffect(()=>{if(i===0&&c===0){T(!0);return}const e=setInterval(()=>{c>0?x(c-1):i>0&&(I(i-1),x(59))},1e3);return()=>clearInterval(e)},[i,c]),t.jsxs(t.Fragment,{children:[F,t.jsx("div",{className:"login-container-left",children:t.jsxs("div",{style:{maxWidth:"400px",margin:"auto",padding:"20px"},children:[t.jsx(j,{icon:t.jsx(O,{}),style:{marginBottom:"10px"},onClick:()=>{u("/forgot-password")},children:"Back"}),t.jsx("h2",{children:"Check Your Inbox!"}),t.jsxs("p",{className:"custom-text1",children:["We’ve sent the reset code to ",n,". Enter the code to continue."," "]}),t.jsxs(d,{name:"verify otp",form:b,initialValues:{remember:!0},onFinish:C,layout:"vertical",children:[t.jsx(d.Item,{children:t.jsx(B.OTP,{onChange:e=>{N(e)},name:"otp",size:"large",length:6})}),t.jsx(d.Item,{children:t.jsxs(E,{children:["Didn’t get the code?"," ",S?t.jsxs("span",{onClick:()=>{k()},className:"custom-text-link",children:["Resend"," "]}):t.jsxs(t.Fragment,{children:["Wait ",g(i),":",g(c)]})," "]})}),t.jsx(d.Item,{children:t.jsx(j,{className:"custom-primary-button",htmlType:"submit",block:!0,children:"Continue"})})]})]})})]})};export{V 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.