PageSourceSearch

https://c24club.com/assets/DeleteAccountPage-DCOjb4Cj.js

js c24club.com collected 2026-10-08 01:56:28 UTC 7,751 bytes, 3 lines download raw bytes

1import{u as q,r as l,bh as C,j as e,Z as d,T as S,ad as f,a4 as i,s as u}from"./index-CnwAbAWO.js";import{C as k}from"./circle-check-BZ5AnZ4A.js";import{o as D,s as j}from"./types-CDqVKZbI.js";const A=D({email:j().trim().email("Invalid email address").max(255),reason:j().trim().max(1e3).optional()}),P=()=>{const{user:s}=q(),[m,h]=l.useState(""),[x,b]=l.useState(""),[r,n]=l.useState(!1),[g,p]=l.useState(!1),[c,y]=l.useState(!1);C({title:"Delete Your Account - C24 Club",description:"Request deletion of your C24 Club account and associated data. Learn what data is removed, what is retained, and how to submit a request.",path:"/delete-account"}),l.useEffect(()=>{s!=null&&s.email&&h(s.email)},[s]);const N=async()=>{if(s){if(!c){i.error("Please confirm you understand this is permanent.");return}n(!0);try{const{data:t,error:a}=await u.functions.invoke("delete-account",{body:{}});if(a)throw a;if((t==null?void 0:t.success)===!1)throw new Error(t.error||"Failed to delete");await u.auth.signOut(),p(!0),i.success("Your account has been deleted.")}catch(t){console.error("delete-account error:",t),i.error((t==null?void 0:t.message)||"Could not delete account. Please submit a request below.")}finally{n(!1)}}},v=async t=>{var w;t.preventDefault();const a=A.safeParse({email:m,reason:x});if(!a.success){i.error(((w=a.error.issues[0])==null?void 0:w.message)||"Invalid input");return}n(!0);try{const{error:o}=await u.from("contact_messages").insert({name:"Account Deletion Request",email:a.data.email,subject:"Account Deletion Request",message:`The user with email ${a.data.email} has requested account deletion.
2
3Reason: ${a.data.reason||"(not provided)"}`,user_id:(s==null?void 0:s.id)??null});if(o)throw o;p(!0),b(""),i.success("Your deletion request has been submitted.")}catch(o){console.error("delete request error:",o),i.error("Failed to submit. Please email [email protected] directly.")}finally{n(!1)}};return e.jsx("div",{className:"min-h-screen bg-black pt-24 pb-16 px-4",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-red-500/15 border border-red-500/30 flex items-center justify-center mx-auto mb-4",children:e.jsx(d,{className:"w-7 h-7 text-red-400"})}),e.jsx("h1",{className:"text-4xl md:text-5xl font-black text-white mb-3",children:"Delete Your Account"}),e.jsx("p",{className:"text-white/60",children:"Request that your C24 Club account and associated data be permanently deleted."})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-white font-bold text-lg mb-3",children:"What we delete"}),e.jsxs("ul",{className:"text-white/70 text-sm space-y-2 list-disc list-inside",children:[e.jsx("li",{children:"Your profile, photos, and Discover listing"}),e.jsx("li",{children:"Your messages, gifts, and call history"}),e.jsx("li",{children:"Your minute balance, rewards, and referral data"}),e.jsx("li",{children:"Your authentication account (email/password, Google, etc.)"})]}),e.jsx("h2",{className:"text-white font-bold text-lg mt-6 mb-3",children:"What we retain"}),e.jsxs("ul",{className:"text-white/70 text-sm space-y-2 list-disc list-inside",children:[e.jsx("li",{children:"Records required by law (e.g. payment/transaction receipts) for up to 7 years for tax and accounting purposes"}),e.jsx("li",{children:"Safety records (e.g. ban history, abuse reports) retained indefinitely to prevent re-registration of banned users"}),e.jsx("li",{children:"Anonymized, aggregated analytics that cannot identify you"})]})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-white font-bold text-lg mb-3",children:"How to request deletion"}),e.jsxs("ol",{className:"text-white/70 text-sm space-y-2 list-decimal list-inside",children:[e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold text-white",children:"In-app (fastest):"})," Open the app, go to ",e.jsx("span",{className:"text-white",children:"Settings → Account → Delete Account"}),". Your account is deleted immediately."]}),e.jsxs("li",{children:[e.jsx("span",{className:"font-semibold text-white",children:"On this page:"})," If you're signed in below, you can delete your account with one click. Otherwise, submit a request using the form below and we'll process it within 30 days."]})]})]}),g?e.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/30 rounded-2xl p-8 text-center",children:[e.jsx(k,{className:"w-12 h-12 text-emerald-400 mx-auto mb-3"}),e.jsx("h3",{className:"text-white font-bold text-xl mb-1",children:"Request received"}),e.jsx("p",{className:"text-white/60 text-sm",children:"We've recorded your deletion request. You'll receive a confirmation email when it's processed."})]}
3):s?e.jsxs("div",{className:"bg-red-500/10 border border-red-500/30 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx(S,{className:"w-5 h-5 text-red-400 flex-shrink-0 mt-0.5"}),e.jsxs("p",{className:"text-white/80 text-sm",children:["You're signed in as ",e.jsx("span",{className:"font-bold text-white",children:s.email}),". Deleting your account is permanent and cannot be undone."]})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer mb-5",children:[e.jsx("input",{type:"checkbox",checked:c,onChange:t=>y(t.target.checked),className:"mt-1 w-4 h-4 accent-red-500"}),e.jsx("span",{className:"text-white/70 text-sm",children:"I understand my account, profile, messages, rewards, and minute balance will be permanently deleted."})]}),e.jsxs("button",{onClick:N,disabled:r||!c,className:"w-full bg-red-500 hover:bg-red-400 text-white font-bold py-3.5 rounded-xl transition-colors disabled:opacity-50 flex items-center justify-center gap-2",children:[r?e.jsx(f,{className:"w-5 h-5 animate-spin"}):e.jsx(d,{className:"w-5 h-5"}
3),r?"Deleting...":"Permanently Delete My Account"]})]}):e.jsxs("form",{onSubmit:v,className:"bg-white/5 border border-white/10 rounded-2xl p-6 space-y-4",children:[e.jsx("h2",{className:"text-white font-bold text-lg",children:"Submit a deletion request"}),e.jsx("p",{className:"text-white/50 text-sm",children:"Enter the email address of the account you'd like to delete. We'll verify and process your request within 30 days."}),e.jsxs("div",{children:[e.jsx("label",{className:"text-white/60 text-sm block mb-1.5",children:"Account Email"}),e.jsx("input",{type:"email",required:!0,placeholder:"[email protected]",value:m,onChange:t=>h(t.target.value),className:"w-full bg-white/5 border border-white/10 rounded-lg px-4 py-3 text-white placeholder:text-white/30 focus:outline-none focus:border-red-500/50"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-white/60 text-sm block mb-1.5",children:"Reason (optional)"}),e.jsx("textarea",{rows:3,placeholder:"Help us improve — why are you leaving?",value:x,onChange:t=>b(t.target.value),className:"w-full bg-white/5 border border-white/10 rounded-lg px-4 py-3 text-white placeholder:text-white/30 focus:outline-none focus:border-red-500/50 resize-none"})]}),e.jsxs("button",{type:"submit",disabled:r,className:"w-full bg-red-500 hover:bg-red-400 text-white font-bold py-3.5 rounded-xl transition-colors disabled:opacity-50 flex items-center justify-center gap-2",children:[r?e.jsx(f,{className:"w-5 h-5 animate-spin"}):e.jsx(d,{className:"w-5 h-5"}),r?"Submitting...":"Submit Deletion Request"]}),e.jsxs("p",{className:"text-white/30 text-xs text-center",children:["Or email us directly at"," ",e.jsx("a",{href:"mailto:[email protected]",className:"text-red-400 hover:underline",children:"[email protected]"})]})]})]})})};export{P 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.