/* MEXYFOR — Contact (お問い合わせ) Page Design Comp / Plan A direction */ const ContactComp = () => { const T = window.TOKENS; const initialForm = { inquiryType: '事業・サービスに関するお問い合わせ', name: '', company: '', email: '', message: '', privacyAgreed: false, }; const [formData, setFormData] = React.useState(initialForm); const [status, setStatus] = React.useState('idle'); // idle | sending | success | error const update = (key) => (e) => setFormData((p) => ({ ...p, [key]: e.target.value })); const ENDPOINT = 'https://script.google.com/macros/s/AKfycbxNs1sey8O6Y4PkIxH7nvio78v0SOael3Zb4lbVB1w97uwVuMxN6e9jCJOD3Rn8Dm-w/exec'; const handleSubmit = async (e) => { e.preventDefault(); if (status === 'sending') return; if (!formData.privacyAgreed) { alert('プライバシーポリシーへの同意が必要です。'); return; } setStatus('sending'); try { const res = await fetch(ENDPOINT, { method: 'POST', body: JSON.stringify({ inquiryType: formData.inquiryType, name: formData.name, company: formData.company, email: formData.email, message: formData.message || '記載なし', }), }); const data = await res.json().catch(() => ({})); console.log('[Contact] response:', res.status, data); if (!res.ok || data.success !== true) { throw new Error(data.error || `HTTP ${res.status}`); } setStatus('success'); setFormData(initialForm); } catch (err) { console.error('[Contact] submission failed:', err); setStatus('error'); } }; const wrap = { width: '100%', maxWidth: 1440, margin: '0 auto', background: T.paper, color: T.ink, fontFamily: T.sans, }; const lbl = { fontFamily: T.mono, fontSize: 10, letterSpacing: '0.28em', color: T.ink3, textTransform: 'uppercase' }; const fieldLabel = { fontFamily: T.mono, fontSize: 11, letterSpacing: '0.18em', color: T.ink3, textTransform: 'uppercase' }; const fieldInput = { width: '100%', padding: '14px 0', fontSize: 16, fontFamily: T.serif, color: T.ink, background: 'transparent', border: 'none', borderBottom: `1px solid ${T.rule}`, outline: 'none', boxSizing: 'border-box', }; return (
{/* ---------- Header ---------- */}
MEXYFOR
{/* ---------- Breadcrumb ---------- */}
Top お問い合わせ
{/* ---------- HERO ---------- */}
Get in touch.

Contact

事業・サービスに関するご相談、ご提携やアライアンスのご相談など、 下記フォームよりお気軽にお問い合わせください。
{/* ---------- FORM ---------- */}
フォーム
Inquiry form
* 印は必須項目です。 いただいた情報は、お問い合わせへの対応のみに使用します。
{/* Inquiry type — segmented */}
用件区分 *
{[ '事業・サービスに関するお問い合わせ', '提携・アライアンスご相談', ].map((t, i) => { const sel = formData.inquiryType === t; return (
setFormData((p) => ({ ...p, inquiryType: t }))} style={{ padding: '24px 28px', background: sel ? T.ink : 'transparent', color: sel ? T.paper : T.ink2, borderRight: i === 0 ? `1px solid ${T.rule}` : 'none', cursor: 'pointer', fontSize: 13, fontFamily: T.serif, letterSpacing: '0.04em', display: 'flex', alignItems: 'center', gap: 12, userSelect: 'none', }} > {t}
); })}
{/* Name + Company */}
お名前 *
会社名・組織名 *
{/* Email */}
メールアドレス *
{/* Body */}
お問い合わせ内容 *
{/* Privacy */}
setFormData((p) => ({ ...p, privacyAgreed: !p.privacyAgreed }))} style={{ marginBottom: 24, padding: '24px 28px', background: T.paperDeep, border: `1px solid ${formData.privacyAgreed ? T.orange : T.rule}`, fontSize: 12, color: T.ink2, lineHeight: 2, display: 'flex', alignItems: 'flex-start', gap: 16, cursor: 'pointer', userSelect: 'none', }} > {formData.privacyAgreed && ( )} e.stopPropagation()} style={{ color: T.ink, borderBottom: `1px solid ${T.ink2}`, textDecoration: 'none' }} >プライバシーポリシー に同意のうえ、送信します。
{/* Status message */} {status === 'success' && (
お問い合わせを受け付けました。担当者よりご返信いたします。
)} {status === 'error' && (
送信に失敗しました。時間をおいて再度お試しいただくか、kanai@mexyfor.co.jp まで直接ご連絡ください。
)} {/* Submit */}
{/* ---------- Footer ---------- */}
); }; window.ContactComp = ContactComp;