PageSourceSearch

https://www.ufxproject.com/assets/VerifyEmail-DFfaKrNp.js

js ufxproject.com collected 2026-10-08 23:27:17 UTC 3,186 bytes, 1 lines download raw bytes

1import{r as c,j as e}from"./react-vendor-36xutOou.js";import{L as x,C as f,g as u}from"./ui-vendor-ISMvyiob.js";import{a as g,u as h,L as y}from"./utils-vendor-CgZjKQg8.js";import"./map-vendor-Cba94izB.js";const p="https://ufx-backend-production.up.railway.app";function k(){const[m]=g(),a=h(),[t,s]=c.useState("verifying"),[l,r]=c.useState(""),i=m.get("token");c.useEffect(()=>{(async()=>{if(!i){s("error"),r("Invalid verification link. Token is missing.");return}try{const n=await(await fetch(`${p}/api/auth/verify-email/${i}`)).json();n.success?(s("success"),r(n.message||"Email verified successfully!"),setTimeout(()=>{a("/email-verified")},2e3)):(s("error"),r(n.message||"Verification failed. The link may be expired or invalid."))}catch(o){console.error("Verification error:",o),s("error"),r("An error occurred during verification. Please try again.")}})()},[i,a]);const d=()=>{a("/verify-email-pending")};return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-900 via-ufx-primary to-ufx-secondary flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8",children:e.jsx("div",{className:"max-w-md w-full space-y-8 bg-white rounded-2xl shadow-2xl p-8",children:e.jsxs("div",{className:"text-center",children:[t==="verifying"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx(x,{className:"h-16 w-16 text-ufx-primary animate-spin"})}),e.jsx("h2",{className:"text-3xl font-extrabold text-gray-900 mb-4",children:"Verifying Your Email"}),e.jsx("p",{className:"text-gray-600",children:"Please wait while we verify your email address..."})]}),t==="success"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("div",{className:"bg-green-100 rounded-full p-6 animate-bounce",children:e.jsx(f,{className:"h-16 w-16 text-green-600"})})}),e.jsx("h2",{className:"text-3xl font-extrabold text-gray-900 mb-4",children:"Verification Successful!"}),e.jsx("p",{className:"text-gray-600 mb-4",children:l}),e.jsx("p",{className:"text-sm text-gray-500",children:"Redirecting you to the success page..."})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("div",{className:"bg-red-100 rounded-full p-6",children:e.jsx(u,{className:"h-16 w-16 text-red-600"})})}),e.jsx("h2",{className:"text-3xl font-extrabold text-gray-900 mb-4",children:"Verification Failed"}),e.jsx("p",{className:"text-gray-600 mb-6",children:l}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("button",{onClick:d,className:"w-full flex justify-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-gradient-to-r from-ufx-primary to-ufx-secondary hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-ufx-primary transition-all",children:"Request New Verification Email"}),e.jsx(y,{to:"/login",className:"block w-full text-center py-3 px-4 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-ufx-primary transition-all",children:"Back to Login"})]})]})]})})})}export{k 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.