1import { b5 as useSearchParams, r as reactExports, j as jsxRuntimeExports, aC as Helmet, aF as LoaderCircle, a$ as CircleCheckBig, L as Link, aK as ArrowRight, bo as ShieldCheck, bY as CircleX } from "./vendor-BRPG2tLG.js"; 2import "./preload-D9ItKcgK.js"; 3function ProfileVerifyPage() { 4 const [searchParams] = useSearchParams(); 5 const token = searchParams.get("token"); 6 const uid = searchParams.get("uid"); 7 const [state, setState] = reactExports.useState("loading"); 8 const [errorMsg, setErrorMsg] = reactExports.useState(""); 9 reactExports.useEffect(() => { 10 async function verify() { 11 try { 12 const body = {}; 13 if (token && uid) { 14 body.token = token; 15 body.uid = uid; 16 } 17 const r = await fetch("/api/profile/acknowledge", { 18 method: "POST", 19 credentials: "include", 20 headers: { 21 "Content-Type": "application/json" 22 }, 23 body: JSON.stringify(body) 24 }); 25 const data = await r.json(); 26 if (!r.ok) { 27 setErrorMsg(data.error ?? "Verification failed."); 28 setState("error"); 29 return; 30 } 31 setState(data.alreadyVerified ? "already" : "success"); 32 } catch { 33 setErrorMsg("Network error. Please try again."); 34 setState("error"); 35 } 36 } 37 verify(); 38 }, [token, uid]); 39 return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ 40 /* @__PURE__ */ jsxRuntimeExports.jsxs(Helmet, { children: [
41 /* @__PURE__ */ jsxRuntimeExports.jsx("title", { children: "Profile Verification â LCplUnderground.Vet" }), 42 /* @__PURE__ */ jsxRuntimeExports.jsx("meta", { name: "description", content: "Verify your LCplUnderground.Vet profile to keep your account active." }), 43 /* @__PURE__ */ jsxRuntimeExports.jsx("link", { rel: "canonical", href: "https://lcplunderground.vet/profile/verify" }), 44 /* @__PURE__ */ jsxRuntimeExports.jsx("meta", { name: "robots", content: "noindex" }) 45 ] }), 46 /* @__PURE__ */ jsxRuntimeExports.jsx("main", { className: "min-h-[70vh] flex items-center justify-center px-4 py-16", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full max-w-md", children: [ 47 state === "loading" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [ 48 /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-12 w-12 text-primary animate-spin mx-auto mb-4" }), 49 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-base font-semibold text-foreground", children: "Verifying your profileâ¦" }),
50 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "This takes just a moment." }) 51 ] }), 52 state === "success" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-sm border border-green-500/30 bg-green-500/5 p-8 text-center", children: [ 53 /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheckBig, { className: "h-14 w-14 text-green-400 mx-auto mb-4" }), 54 /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-xl font-black text-foreground uppercase tracking-wide mb-2", children: "Profile Verified" }), 55 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed mb-6", children: "Your account is confirmed and active. Thank you for taking the time to verify â it keeps the platform secure for every member." }), 56 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3", children: [ 57 /* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { to: "/profile", className: "flex items-center justify-center gap-2 px-6 py-3 rounded-sm bg-primary text-white font-bold text-sm uppercase tracking-wide hover:bg-primary/90 transition-colors", children: [ 58 "Go to My Profile ",
59 /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "h-4 w-4" }) 60 ] }), 61 /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: "/", className: "text-sm text-muted-foreground hover:text-foreground transition-colors", children: "Return to Home" }) 62 ] }) 63 ] }), 64 state === "already" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-sm border border-border bg-card p-8 text-center", children: [ 65 /* @__PURE__ */ jsxRuntimeExports.jsx(ShieldCheck, { className: "h-14 w-14 text-primary mx-auto mb-4" }), 66 /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-xl font-black text-foreground uppercase tracking-wide mb-2", children: "Already Verified" }), 67 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed mb-6", children: "Your profile was already confirmed. Your account is active and in good standing." }), 68 /* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { to: "/profile", className: "flex items-center justify-center gap-2 px-6 py-3 rounded-sm bg-primary text-white font-bold text-sm uppercase tracking-wide hover:bg-primary/90 transition-colors", children: [ 69 "Go to My Profile ",
70 /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "h-4 w-4" }) 71 ] }) 72 ] }), 73 state === "error" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-sm border border-red-500/30 bg-red-500/5 p-8 text-center", children: [ 74 /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "h-14 w-14 text-red-400 mx-auto mb-4" }), 75 /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-xl font-black text-foreground uppercase tracking-wide mb-2", children: "Verification Failed" }), 76 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed mb-2", children: errorMsg || "Something went wrong. Please try again." }), 77 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground mb-6", children: "If your link has expired, sign in and verify directly from your profile page." }), 78 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3", children: [
79 /* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { to: "/profile", className: "flex items-center justify-center gap-2 px-6 py-3 rounded-sm bg-primary text-white font-bold text-sm uppercase tracking-wide hover:bg-primary/90 transition-colors", children: [ 80 "Sign In & Verify ", 81 /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { className: "h-4 w-4" }) 82 ] }), 83 /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: "/", className: "text-sm text-muted-foreground hover:text-foreground transition-colors", children: "Return to Home" }) 84 ] }) 85 ] }) 86 ] }) }) 87 ] }); 88} 89export { 90 ProfileVerifyPage as default 91};
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.