From e328fc950c54183525c27927706b7a4452302ede Mon Sep 17 00:00:00 2001 From: hbyang Date: Fri, 21 Aug 2026 10:56:39 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=97=85=EC=B2=B4=20=EC=A7=81=EC=A0=91?= =?UTF-8?q?=20=EC=9E=85=EB=A0=A5=20=EC=8B=9C=20=EA=B3=B5=EC=8B=9D=20?= =?UTF-8?q?=ED=99=88=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A7=81=ED=81=AC=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=EB=9E=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BusinessNameInputModal에 선택 입력 URL 필드 추가 (프로토콜 미입력 시 https:// 보정) - onManualInput 콜백 체인(officialSiteUrl) 확장 - POST /marketing 요청 body에 official_site_url 전달 (미입력 시 null) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01DKTAqpFj8pbWzgvq7MRDHk --- src/App.tsx | 4 ++-- src/components/BusinessNameInputModal.tsx | 23 +++++++++++++++++++++-- src/components/SearchInputForm.tsx | 6 +++--- src/locales/en.json | 4 +++- src/locales/ko.json | 4 +++- src/pages/Dashboard/GenerationFlow.tsx | 4 ++-- src/pages/Dashboard/UrlInputContent.tsx | 2 +- src/pages/Landing/HeroSection.tsx | 6 +++--- src/utils/api.ts | 9 +++++++-- 9 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 0a97d10..d631fd2 100755 --- a/src/App.tsx +++ b/src/App.tsx @@ -354,14 +354,14 @@ const App: React.FC = () => { }; // 업체명·주소 수동 입력으로 마케팅 분석 API 호출 - const handleManualInput = async (businessName: string, address: string, category: string) => { + const handleManualInput = async (businessName: string, address: string, category: string, officialSiteUrl?: string) => { setAfterLoadTarget('generation_flow'); setViewMode('loading'); setIsAnalysisComplete(false); setError(null); try { - const data = await marketingAnalysis(businessName, address, category); + const data = await marketingAnalysis(businessName, address, category, officialSiteUrl); if (!validateCrawlingResponse(data)) { throw new Error(t('app.autocompleteError')); diff --git a/src/components/BusinessNameInputModal.tsx b/src/components/BusinessNameInputModal.tsx index 22f844a..82992a2 100644 --- a/src/components/BusinessNameInputModal.tsx +++ b/src/components/BusinessNameInputModal.tsx @@ -5,7 +5,7 @@ import CitySelectModal, { REGIONS } from './CitySelectModal'; interface BusinessNameInputModalProps { onClose: () => void; - onSubmit: (businessName: string, address: string, category: string) => void; + onSubmit: (businessName: string, address: string, category: string, officialSiteUrl: string) => void; } const BusinessNameInputModal: React.FC = ({ onClose, onSubmit }) => { @@ -14,6 +14,7 @@ const BusinessNameInputModal: React.FC = ({ onClose const [selectedCity, setSelectedCity] = useState(''); const [detailAddress, setDetailAddress] = useState(''); const [category, setCategory] = useState(''); + const [officialSiteUrl, setOfficialSiteUrl] = useState(''); const [isCityModalOpen, setIsCityModalOpen] = useState(false); useEffect(() => { @@ -42,7 +43,12 @@ const BusinessNameInputModal: React.FC = ({ onClose const handleSubmit = () => { if (!isValid) return; const fullAddress = `${selectedCity} ${detailAddress.trim()}`; - onSubmit(businessName.trim(), fullAddress, category.trim()); + // 프로토콜 없이 입력하면 https:// 를 붙여서 전달 + const trimmedUrl = officialSiteUrl.trim(); + const normalizedUrl = trimmedUrl && !/^https?:\/\//i.test(trimmedUrl) + ? `https://${trimmedUrl}` + : trimmedUrl; + onSubmit(businessName.trim(), fullAddress, category.trim(), normalizedUrl); onClose(); }; @@ -118,6 +124,19 @@ const BusinessNameInputModal: React.FC = ({ onClose /> +
+ + setOfficialSiteUrl(e.target.value)} + onKeyDown={handleKeyDown} + maxLength={2048} + /> +
+