feat(contact): 푸터에 사업자 정보 추가, 문의 폼에 허니팟·속도 제한
푸터 (haewon 2026-10-01) - aio2o.webforai.kr 푸터와 같은 내용으로 맞춘다: 법인명·본사·연구소 주소와 전화·팩스·이메일. 값의 원본은 그쪽 data/facts.json 이며 지어내지 않았다. - 전화 표기를 점에서 하이픈으로 바꿔 두 사이트를 같게 한다. 문의 폼 보호 장치 - 허니팟: 사람 눈에 안 보이는 입력칸(website)을 두고, 값이 차 있으면 스크립트가 저장하지 않는다. display:none 을 건너뛰는 봇이 있어 화면 밖으로 밀어내고 aria-hidden·tabIndex -1 로 보조기기와 탭 이동에서는 뺀다. - 속도 제한: Apps Script 가 한 시간 30건까지만 받는다. VITE_LEAD_TOKEN 은 빌드 시점에 번들로 들어가 공개값이라 보호 장치가 못 된다. 주소와 토큰이 알려져도 피해가 상한 안에 묶이게 한다. - 알림 실패 분리: 메일 발송이 실패해도 행은 남기고 접수로 응답한다. 지금까지는 메일이 막히면(한도 소진·구글 장애) 저장됐는데도 고객 화면에 "전송 실패"가 떠 접수된 줄 모르고 돌아가게 되어 있었다. 시트에 '알림' 열을 추가해 '보냄' / '실패(메일만)' 을 적어 메일이 안 간 문의를 찾을 수 있게 한다. 토큰 실값은 저장소에 넣지 않는다. 배포본 Apps Script 와 Vercel 환경변수에만 둔다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1710437874
commit
8a96aa0e97
5 files changed
+171
-22
No files matched your search
@@ -32,6 +32,8 @@ export default function ContactModal({ open, onClose, source }: ContactModalProp
|
||||
const [phone, setPhone] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [message, setMessage] = useState('');
|
||||
// 허니팟. 사람은 이 칸을 볼 수 없어 늘 빈 값이고, 폼을 자동으로 채우는 봇만 값을 넣는다.
|
||||
const [website, setWebsite] = useState('');
|
||||
const [state, setState] = useState<SubmitState>('idle');
|
||||
const [fieldError, setFieldError] = useState<string | null>(null);
|
||||
|
||||
@@ -68,6 +70,7 @@ export default function ContactModal({ open, onClose, source }: ContactModalProp
|
||||
email: email.trim(),
|
||||
message: message.trim(),
|
||||
source,
|
||||
website,
|
||||
});
|
||||
setState(result.ok ? 'done' : 'error');
|
||||
};
|
||||
@@ -149,6 +152,21 @@ export default function ContactModal({ open, onClose, source }: ContactModalProp
|
||||
간단히 남겨주시면 담당자가 회신드립니다.
|
||||
</p>
|
||||
|
||||
{/* 허니팟. display:none 을 피하는 봇이 있어 화면 밖으로 밀어내고,
|
||||
보조기기와 탭 이동에서는 빼둔다. 사람이 채울 일이 없는 칸이다. */}
|
||||
<div aria-hidden="true" className="absolute left-[-9999px] top-0 w-px h-px overflow-hidden">
|
||||
<label htmlFor="contact-website">웹사이트 (입력하지 마세요)</label>
|
||||
<input
|
||||
id="contact-website"
|
||||
name="website"
|
||||
type="text"
|
||||
tabIndex={-1}
|
||||
autoComplete="off"
|
||||
value={website}
|
||||
onChange={(e) => setWebsite(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<label className="block text-xs font-semibold text-slate-500 mb-1.5">
|
||||
성함 <span className="text-[#7C3A4B]">*</span>
|
||||
</label>
|
||||
|
||||
+31
-12
@@ -9,7 +9,15 @@
|
||||
import { useState } from 'react';
|
||||
import { Link } from 'react-router';
|
||||
import ContactModal from './ContactModal';
|
||||
import { CONTACT_EMAIL, CONTACT_PHONE, CONTACT_PHONE_HREF } from '../lib/contact';
|
||||
import {
|
||||
CONTACT_EMAIL,
|
||||
CONTACT_PHONE,
|
||||
CONTACT_PHONE_HREF,
|
||||
CONTACT_FAX,
|
||||
COMPANY_LEGAL_NAME,
|
||||
COMPANY_HQ,
|
||||
COMPANY_LAB,
|
||||
} from '../lib/contact';
|
||||
|
||||
export default function Footer() {
|
||||
const [contactOpen, setContactOpen] = useState(false);
|
||||
@@ -40,17 +48,28 @@ export default function Footer() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 구분선 + 연락처 한 줄 */}
|
||||
<div className="border-t border-slate-100 pt-6 text-sm text-slate-500 text-center md:text-left">
|
||||
<span className="text-slate-400">전화</span>{' '}
|
||||
<a href={CONTACT_PHONE_HREF} className="underline underline-offset-4 decoration-slate-300 hover:text-primary-900 transition-colors">
|
||||
{CONTACT_PHONE}
|
||||
</a>
|
||||
<span className="mx-2 text-slate-300">·</span>
|
||||
<span className="text-slate-400">이메일</span>{' '}
|
||||
<a href={`mailto:${CONTACT_EMAIL}`} className="underline underline-offset-4 decoration-slate-300 hover:text-primary-900 transition-colors">
|
||||
{CONTACT_EMAIL}
|
||||
</a>
|
||||
{/* 구분선 + 사업자 정보 + 연락처. aio2o.webforai.kr 푸터와 같은 내용으로 맞춘다. */}
|
||||
<div className="border-t border-slate-100 pt-6 flex flex-col gap-2 text-sm text-slate-500 text-center md:text-left">
|
||||
<p className="[word-break:keep-all]">
|
||||
<span className="font-semibold text-slate-600">{COMPANY_LEGAL_NAME}</span>
|
||||
<span className="mx-2 text-slate-300">·</span>
|
||||
{COMPANY_HQ}
|
||||
<span className="mx-2 text-slate-300">·</span>
|
||||
{COMPANY_LAB}
|
||||
</p>
|
||||
<p>
|
||||
<span className="text-slate-400">전화</span>{' '}
|
||||
<a href={CONTACT_PHONE_HREF} className="underline underline-offset-4 decoration-slate-300 hover:text-primary-900 transition-colors">
|
||||
{CONTACT_PHONE}
|
||||
</a>
|
||||
<span className="mx-2 text-slate-300">·</span>
|
||||
<span className="text-slate-400">팩스</span> {CONTACT_FAX}
|
||||
<span className="mx-2 text-slate-300">·</span>
|
||||
<span className="text-slate-400">이메일</span>{' '}
|
||||
<a href={`mailto:${CONTACT_EMAIL}`} className="underline underline-offset-4 decoration-slate-300 hover:text-primary-900 transition-colors">
|
||||
{CONTACT_EMAIL}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user