1import{u as v,a as N,r as s,j as e,V as k,B as y,C as w,k as S,c as E,D as C}from"./index-DTlGp7Od.js";import{a as R}from"./authApi-CAwSzJa9.js";const I=()=>{const t=v(),[i]=N(),[a,x]=s.useState(""),[n,l]=s.useState(!1),[c,d]=s.useState(""),[o,m]=s.useState(""),[u,g]=s.useState(""),h=`${k}/login.svg`;s.useEffect(()=>{const r=i.get("email"),b=i.get("source");r?(x(decodeURIComponent(r)),g(b||"")):t("/signup")},[i,t]);const f=async()=>{if(a){l(!0),d(""),m("");try{await R.signUp(a,"dummy",void 0,u||void 0),d("Verification email has been resent. Please check your inbox.")}catch(r){m(r?.message||"Failed to resend verification email. Please try again.")}finally{l(!1)}}},p=()=>{t("/signup")},j=()=>{t("/login")};return e.jsx("div",{className:"min-h-screen w-full relative flex flex-col justify-between overflow-hidden",style:{backgroundImage:`url(${h})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:"black"},children:e.jsxs("div",{className:"relative z-10 flex-grow flex items-center justify-center px-4 sm:px-6",children:[e.jsx("div",{className:"w-full fixed top-6 left-6",children:e.jsx("button",{className:"text-sm font-semibold",onClick:p,"aria-label":"Back to signup",children:e.jsx(y,{})})}),e.jsx("div",{className:"w-full max-w-[527px] flex flex-col items-center",children:e.jsx("div",{className:"w-full bg-card rounded-3xl flex items-center justify-center px-6 pt-9 pb-8 shadow-lg",children:e.jsxs("div",{className:"w-full max-w-[364px]",children:[e.jsxs("div",{className:"text-center flex flex-col items-center mb-8",children:[e.jsx("div",{className:"mb-4 fill-black dark:fill-white",children:e.jsx(w,{})}),e.jsx("h4",{className:"text-2xl text-gray-900 dark:text-white font-medium",children:"Check Your Email"})]}),e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"mb-6 flex justify-center",children:e.jsx("div",{className:"h-16 w-16 bg-primary-300 rounded-full flex items-center justify-center",children:e.jsx(S,{className:"h-8 w-8 text-primary "})})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-muted-foreground",children:"We've sent a verification email to:"}),e.jsx("div",{className:"bg-gray-100 dark:bg-gray-800 rounded-lg px-4 py-3",children:e.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:a})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Click the verification link in the email to complete your signup. The link will expire in 24 hours."})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Didn't receive the email?"}),e.jsx(E,{type:"button",variant:"outline",className:"h-[45px] w-full rounded-full",onClick:f,disabled:n||!a,children:n?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"mr-2 h-4 w-4 animate-spin"}),"Resending..."]}):"Resend Verification Email"})]}),c&&e.jsx("div",{className:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-3",children:e.jsx("p",{className:"text-sm text-green-700 dark:text-green-300 text-center",children:c})}),o&&e.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-3",children:e.jsx("p",{className:"text-sm text-red-700 dark:text-red-300 text-center",children:o})})]}),e.jsx("div",{className:"text-center pt-6",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Already verified your email?"," ",e.jsx("button",{type:"button",onClick:j,className:"text-primary hover:underline font-medium cursor-pointer",children:"Log In"})]})})]})})})]})})};export{I as default}; 2//# sourceMappingURL=CheckEmail-DpOki89v.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.