PageSourceSearch

https://hunghoevervip.com/assets/MembershipSuccess-iiFkhm52.js

js hunghoevervip.com collected 2026-10-08 21:32:25 UTC 2,657 bytes, 1 lines download raw bytes

1import{j as e}from"./query-vendor-kvu6DCO6.js";import{d as v,r as a}from"./react-vendor-DhN5vIHY.js";import{i as w,s as u,O as j}from"./index-x3WCjE4v.js";import{L as f}from"./loader-circle-DzDNFP_9.js";function S(){const c=v(),{user:i,isReady:r}=w(),[l,h]=a.useState(""),[t,x]=a.useState(null),[n,m]=a.useState(!1),[p,o]=a.useState(!0),d=a.useMemo(()=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l.trim()),[l]);a.useEffect(()=>{if(!r||!i){r&&o(!1);return}Promise.resolve(u.from("profiles").select("email").eq("id",i.id).maybeSingle()).then(({data:s})=>{s?.email&&x(s.email),o(!1)}).catch(()=>o(!1))},[r,i]);const b=async()=>{if(!d||!i)return;m(!0);const{error:s}=await u.from("profiles").update({email:l.trim()}).eq("id",i.id);if(m(!1),s){j({title:"Could not save email",description:s.message,variant:"destructive"});return}c("/membership")},g=()=>{c("/membership")};return p?e.jsx("div",{className:"min-h-screen bg-[#0a1530] text-white flex items-center justify-center p-4 sm:p-6",children:e.jsx(f,{className:"w-8 h-8 animate-spin text-[#f5c518]"})}):e.jsx("div",{className:"min-h-screen bg-[#0a1530] text-white flex items-center justify-center p-4 sm:p-6",children:e.jsxs("div",{className:"max-w-md w-full text-center space-y-6",children:[e.jsx("h1",{className:"text-4xl font-bold text-[#f5c518]",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Welcome to the VIP Club!"}),e.jsx("p",{className:"text-white/80 text-lg",children:t?"Your subscription is active":"Enter your email address to activate your subscription"}),t?e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"text-sm text-white/80 mb-2",children:"Email address"}),e.jsx("p",{className:"w-full h-12 px-4 rounded-lg bg-white/5 border border-white/10 text-gray-400 flex items-center",children:t})]}):e.jsxs("div",{className:"text-left",children:[e.jsx("label",{htmlFor:"success-email",className:"block text-sm text-white/80 mb-2",children:"Email address"}),e.jsx("input",{id:"success-email",type:"email",autoComplete:"email",value:l,onChange:s=>h(s.target.value),placeholder:"[email protected]",className:"w-full h-12 px-4 rounded-lg bg-white/10 border border-[#f5c518]/30 text-white placeholder-white/40 focus:outline-none focus:border-[#f5c518]"})]}),e.jsxs("button",{onClick:t?g:b,disabled:!t&&(!d||n),className:"w-full h-14 rounded-full bg-[#f5c518] hover:bg-[#f5c518]/90 text-[#0a1530] font-bold text-lg shadow-[0_0_30px_rgba(245,197,24,0.4)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none flex items-center justify-center gap-2",children:[n&&e.jsx(f,{className:"w-5 h-5 animate-spin"}),t?"Continue":"Save"]})]})})}export{S 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.