diff --git a/src/components/Contact.jsx b/src/components/Contact.jsx index e44075d..d414e78 100644 --- a/src/components/Contact.jsx +++ b/src/components/Contact.jsx @@ -31,6 +31,16 @@ const Contact = () => { return; } + // 3. Rate Limiting (Prevent spamming) + const lastSubmission = localStorage.getItem('lastEmailSubmission'); + if (lastSubmission) { + const timePassed = Date.now() - parseInt(lastSubmission, 10); + if (timePassed < 60000) { // 60 seconds + setStatus('잠시 후 다시 시도해주세요. (1분에 한 번만 전송 가능합니다)'); + return; + } + } + setStatus('전송 중...'); try { @@ -52,6 +62,7 @@ const Contact = () => { if (response.ok) { setStatus('문의가 성공적으로 접수되었습니다! 담당자가 곧 연락드리겠습니다.'); setFormData({ name: '', phone: '', message: '', honeypot: '' }); + localStorage.setItem('lastEmailSubmission', Date.now().toString()); alert('문의가 접수되었습니다. 확인 후 연락드리겠습니다!'); } else { setStatus('전송에 실패했습니다. 잠시 후 다시 시도해주세요.'); diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 96935f5..c021976 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -6,9 +6,11 @@ const Footer = () => {
Representative: Gildong Hong | Business License: 000-00-00000
+代表: 홍길동 | Business License: 000-00-00000
주소: 서울특별시 ... (추후 업데이트)
-이메일: contact@sokuree.com | 전화: 02-0000-0000
++ 이메일: { e.currentTarget.href = `mailto:contact@sokuree.com`; }}>{'contact'}@{'sokuree.com'} | 전화: 02-0000-0000 +