PageSourceSearch

https://goexpired.com/assets/Contact-CDEkPAqA.js

js goexpired.com collected 2026-10-09 22:42:16 UTC 4,884 bytes, 1 lines download raw bytes

1import{r as o,j as e,G as S,M as p,y as F,h as E,N as r,s as D,O as b}from"./index-DocTL6Xp.js";import{C as M}from"./circle-check-conwmP9q.js";const s={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#2563EB",accentDark:"#1D4FD8",border:"#E8E5DD",borderStrong:"#D8D3C5"},A=r.object({name:r.string().trim().min(1,"Please enter your name").max(100,"Name too long"),email:r.string().trim().email("Please enter a valid email").max(255,"Email too long"),message:r.string().trim().min(1,"Please enter a message").max(2e3,"Message too long")}),y="[email protected]";function G(){const[m,f]=o.useState(""),[d,j]=o.useState(""),[u,k]=o.useState(""),[n,x]=o.useState({}),[g,h]=o.useState(!1),[C,N]=o.useState(!1);o.useEffect(()=>{document.title="Contact - GoExpired.com"},[]);const v=async a=>{a.preventDefault(),x({});const c=A.safeParse({name:m,email:d,message:u});if(!c.success){const t={};c.error.errors.forEach(l=>{l.path[0]&&(t[l.path[0]]=l.message)}),x(t);return}h(!0);try{const{data:t,error:l}=await D.functions.invoke("send-contact-email",{body:c.data});if(l||!(t!=null&&t.success)){const w=(t==null?void 0:t.error)||(l==null?void 0:l.message)||"Something went wrong. Please try again.";b({title:"Could not send message",description:String(w),variant:"destructive"});return}N(!0)}catch(t){b({title:"Could not send message",description:(t==null?void 0:t.message)||"Please try again or email us directly.",variant:"destructive"})}finally{h(!1)}},i={backgroundColor:s.surface,border:`1px solid ${s.borderStrong}`,color:s.ink};return e.jsxs("div",{style:{backgroundColor:s.bg,color:s.ink,fontFamily:"'Inter', system-ui, sans-serif"},className:"min-h-screen",children:[e.jsx(S,{}),e.jsx("main",{children:e.jsxs("section",{className:"max-w-2xl mx-auto px-6 md:px-8 pt-20 md:pt-28 pb-24",children:[e.jsx("h1",{className:"text-5xl md:text-6xl leading-[1.05] tracking-tight mb-6",style:{fontFamily:"'Cormorant', serif",fontWeight:600,color:s.ink},children:"Get in touch."}),e.jsx("p",{className:"text-lg md:text-xl leading-relaxed mb-6",style:{color:s.inkMuted,fontFamily:"'Cormorant', serif",fontWeight:500},children:"Questions, feedback, or partnership ideas? Send us a message below."}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-sm mb-10",style:{backgroundColor:s.surface,border:`1px solid ${s.border}`,color:s.inkMuted},children:[e.jsx(p,{className:"w-4 h-4",style:{color:s.accent}}),e.jsx("a",{href:`mailto:${y}`,children:y})]}),C?e.jsxs("div",{className:"rounded-2xl p-8 flex items-start gap-4",style:{backgroundColor:s.surface,border:`1px solid ${s.border}`},children:[e.jsx(M,{className:"w-6 h-6 mt-1 flex-shrink-0",style:{color:"#16A34A"}}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl mb-2",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:"Thanks - your message has been sent."}),e.jsx("p",{style:{color:s.inkMuted},children:"We will get back to you as soon as possible."})]})]}):e.jsxs("form",{onSubmit:v,className:"rounded-2xl p-6 md:p-8 space-y-5",style:{backgroundColor:s.surface,border:`1px solid ${s.border}`},children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm mb-2",style:{color:s.ink},children:"Name"}),e.jsx("input",{id:"name",type:"text",value:m,onChange:a=>f(a.target.value),maxLength:100,className:"w-full px-4 py-3 rounded-lg outline-none focus:ring-2",style:i,placeholder:"Your name"}),n.name&&e.jsx("p",{className:"text-sm mt-1.5",style:{color:"#DC2626"},children:n.name})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm mb-2",style:{color:s.ink},children:"Email"}),e.jsx("input",{id:"email",type:"email",value:d,onChange:a=>j(a.target.value),maxLength:255,className:"w-full px-4 py-3 rounded-lg outline-none focus:ring-2",style:i,placeholder:"[email protected]"}),n.email&&e.jsx("p",{className:"text-sm mt-1.5",style:{color:"#DC2626"},children:n.email})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"message",className:"block text-sm mb-2",style:{color:s.ink},children:"Message"}),e.jsx("textarea",{id:"message",value:u,onChange:a=>k(a.target.value),maxLength:2e3,rows:6,className:"w-full px-4 py-3 rounded-lg outline-none focus:ring-2 resize-y",style:i,placeholder:"How can we help?"}),n.message&&e.jsx("p",{className:"text-sm mt-1.5",style:{color:"#DC2626"},children:n.message})]}),e.jsxs("button",{type:"submit",disabled:g,className:"w-full md:w-auto inline-flex items-center justify-center gap-2 px-6 py-3 rounded-lg text-white font-medium transition-colors disabled:opacity-60",style:{backgroundColor:s.accent},onMouseEnter:a=>a.currentTarget.style.backgroundColor=s.accentDark,onMouseLeave:a=>a.currentTarget.style.backgroundColor=s.accent,children:[g?e.jsx(F,{className:"w-4 h-4 animate-spin"}):e.jsx(p,{className:"w-4 h-4"}),"Send message"]})]})]})}),e.jsx(E,{})]})}
1export{G 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.