PageSourceSearch

https://www.magic-geo.tech/assets/Contact-Dmj5wLg8.js

js magic-geo.tech collected 2026-09-24 20:05:46 UTC 5,333 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-radix-D95_QOwI.js";import{r as l,L as f}from"./vendor-react-D8kazXLH.js";import{u as j,a6 as p,L as y,q as v,aj as N,m as i,s as w}from"./index-C8HR-Dmp.js";import{A as S}from"./arrow-left-BiyM080f.js";import"./vendor-shopify-BAYZQhWM.js";import"./vendor-data-DTxAkKxM.js";import"./vendor-charts-Bku11YKm.js";const c="[email protected]",h="[email protected]";function z(){const{i18n:x}=j(),t=(x.language||"en").toLowerCase().startsWith("fr"),[m,u]=l.useState(!1),[d,g]=l.useState(!1),[s,o]=l.useState({name:"",email:"",subject:"",message:""});l.useEffect(()=>{document.title="Contact — MagicGEO";const a=t?"Contactez l'équipe MagicGEO. Écrivez-nous à [email protected] ou [email protected], ou utilisez le formulaire.":"Get in touch with the MagicGEO team. Email us at [email protected] or [email protected], or use the form.";let r=document.querySelector('meta[name="description"]');r||(r=document.createElement("meta"),r.setAttribute("name","description"),document.head.appendChild(r)),r.setAttribute("content",a);let n=document.querySelector('link[rel="canonical"]');n||(n=document.createElement("link"),n.setAttribute("rel","canonical"),document.head.appendChild(n)),n.setAttribute("href","https://www.magic-geo.tech/contact")},[t]);const b=async a=>{if(a.preventDefault(),!s.name||!s.email||!s.subject||!s.message){i.error(t?"Merci de remplir tous les champs.":"Please fill in all fields.");return}u(!0);try{const{error:r}=await w.functions.invoke("send-contact-email",{body:s});if(r)throw r;g(!0),i.success(t?"Message envoyé !":"Message sent!",{description:t?"Nous vous répondrons rapidement.":"We'll get back to you shortly."}),o({name:"",email:"",subject:"",message:""}),setTimeout(()=>g(!1),5e3)}catch{i.error(t?"Échec de l'envoi":"Sending failed",{description:t?`Écrivez-nous directement à ${c}`:`Email us directly at ${c}`})}finally{u(!1)}};return e.jsx("div",{className:"web-theme min-h-screen bg-slate-950 text-slate-100",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-12 sm:py-16",children:[e.jsxs(f,{to:"/welcome",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-cyan-400 transition mb-8",children:[e.jsx(S,{className:"h-4 w-4"}),t?"Retour à l'accueil":"Back to home"]}),e.jsx("h1",{className:"text-3xl sm:text-4xl font-black mb-3",children:t?"Contactez-nous":"Get in touch"}),e.jsx("p",{className:"text-slate-400 mb-10 max-w-xl",children:t?"Une question avant de créer un compte ? Notre équipe est là pour vous aider. Écrivez-nous directement ou via le formulaire ci-dessous.":"A question before creating an account? Our team is here to help. Email us directly or use the form below."}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 mb-10",children:[e.jsxs("a",{href:`mailto:${c}`,className:"flex items-start gap-3 rounded-xl border border-slate-800 bg-slate-900/60 p-5 hover:border-cyan-500/50 transition",children:[e.jsx(p,{className:"h-5 w-5 text-cyan-400 mt-0.5 shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:t?"Demandes générales":"General inquiries"}),e.jsx("div",{className:"text-sm text-cyan-400 break-all",children:c})]})]}),e.jsxs("a",{href:`mailto:${h}`,className:"flex items-start gap-3 rounded-xl border border-slate-800 bg-slate-900/60 p-5 hover:border-cyan-500/50 transition",children:[e.jsx(p,{className:"h-5 w-5 text-cyan-400 mt-0.5 shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:"Support"}),e.jsx("div",{className:"text-sm text-cyan-400 break-all",children:h})]})]})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4 rounded-2xl border border-slate-800 bg-slate-900/40 p-6 sm:p-8",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[e.jsx("input",{value:s.name,onChange:a=>o({...s,name:a.target.value}),placeholder:t?"Votre nom":"Your name",className:"w-full rounded-lg bg-slate-950 border border-slate-800 px-4 py-3 text-sm focus:outline-none focus:border-cyan-500"}),e.jsx("input",{type:"email",value:s.email,onChange:a=>o({...s,email:a.target.value}
1),placeholder:t?"Votre e-mail":"Your email",className:"w-full rounded-lg bg-slate-950 border border-slate-800 px-4 py-3 text-sm focus:outline-none focus:border-cyan-500"})]}),e.jsx("input",{value:s.subject,onChange:a=>o({...s,subject:a.target.value}),placeholder:t?"Sujet":"Subject",className:"w-full rounded-lg bg-slate-950 border border-slate-800 px-4 py-3 text-sm focus:outline-none focus:border-cyan-500"}),e.jsx("textarea",{value:s.message,onChange:a=>o({...s,message:a.target.value}),placeholder:t?"Votre message":"Your message",rows:6,className:"w-full rounded-lg bg-slate-950 border border-slate-800 px-4 py-3 text-sm focus:outline-none focus:border-cyan-500 resize-y"}),e.jsx("button",{type:"submit",disabled:m||d,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500 hover:bg-cyan-400 disabled:opacity-60 text-slate-950 font-semibold px-6 py-3 text-sm transition",children:m?e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 animate-spin"})," ",t?"Envoi...":"Sending..."]}):d?e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"h-4 w-4"})," ",t?"Envoyé":"Sent"]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"h-4 w-4"})," ",t?"Envoyer le message":"Send message"]})})]})]})})}export{z 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.