- {/* Animated background orbs - 스크롤에 따라 빠르게 사라짐 */}
+ {/* Animated background orbs */}
= ({ onAnalyze, onAutocomplete, on
- {/* Logo Image */}

-
- {/* Input Form */}
-
-
- {/* 드롭다운 */}
-
-
- {isDropdownOpen && (
-
- {searchTypeOptions.map((option) => (
-
- ))}
-
- )}
-
-
-
-
{
- let value = e.target.value;
-
- // URL 모드일 때 URL만 추출 (예: "[네이버 지도] https://...")
- if (searchType === 'url') {
- const urlMatch = value.match(/https?:\/\/\S+/);
- if (urlMatch && urlMatch[0] !== value) {
- value = urlMatch[0];
- }
- }
-
- setInputValue(value);
- setHighlightedIndex(-1);
- hideOnInput(value);
- if (localError) setLocalError('');
-
- // 업체명 검색일 때 자동완성 검색 (디바운스)
- if (searchType === 'name') {
- if (debounceRef.current) {
- clearTimeout(debounceRef.current);
- }
- debounceRef.current = setTimeout(() => {
- handleAutocompleteSearch(value);
- }, 300);
- }
- }}
- onPaste={(e: React.ClipboardEvent
) => {
- if (searchType !== 'url') return;
- const pasted = e.clipboardData.getData('text');
- const urlMatch = pasted.match(/https?:\/\/[^\s]+/);
- if (urlMatch) {
- e.preventDefault();
- setInputValue(urlMatch[0]);
- if (localError) setLocalError('');
- }
- }}
- onFocus={() => {
- setIsFocused(true);
- if (searchType === 'name' && autocompleteResults.length > 0) {
- setShowAutocomplete(true);
- }
- openHistory(inputValue);
- }}
- onBlur={() => { setIsFocused(false); setTimeout(() => closeHistory(), 150); }}
- onKeyDown={handleKeyDown}
- placeholder={getPlaceholder()}
- className={`hero-input ${inputValue ? 'has-value' : ''}`}
- />
-
- {/* 최근 검색 히스토리 */}
- {showHistory && !showAutocomplete && (
- {
- closeHistory();
- if (item.type === 'url') {
- setSearchType('url');
- setInputValue(item.value);
- } else {
- setSearchType('name');
- setInputValue(item.value);
- setSelectedItem({ title: item.value, address: item.address || '', roadAddress: item.roadAddress || '' });
- }
- }}
- onDelete={(e, value) => { e.preventDefault(); e.stopPropagation(); deleteItem(value); }}
- className="hero-autocomplete-dropdown"
- itemClassName="hero-autocomplete-item"
- titleClassName="hero-autocomplete-title"
- addressClassName="hero-autocomplete-address"
- />
- )}
-
- {/* 자동완성 결과 */}
- {showAutocomplete && searchType === 'name' && (
-
- {isAutocompleteLoading ? (
-
{t('landing.hero.searching')}
- ) : (
- autocompleteResults.map((item, index) => (
-
- ))
- )}
-
- )}
-
- {inputValue && (
-
- )}
-
-
{getGuideText()}
- {error && (
-
{error}
- )}
-
-
-
- {/* 직접 입력 버튼 */}
-
-
+
{
+ if (isLoggedIn()) {
+ setIsManualModalOpen(true);
+ } else {
+ setIsLoginPromptOpen(true);
+ }
+ }}
+ error={externalError || testError || null}
+ />
{/* Footer Indicator */}
- {/* 테스트 버튼 (VITE_IS_TESTPAGE=true일 때만 표시) */}
+ {/* 테스트 버튼 */}
{isTestPage && onTestData && (
-
);
};
diff --git a/src/pages/Login/LoginSection.tsx b/src/pages/Login/LoginSection.tsx
index 5a1a64c..cf3cfdf 100755
--- a/src/pages/Login/LoginSection.tsx
+++ b/src/pages/Login/LoginSection.tsx
@@ -77,7 +77,7 @@ const LoginSection: React.FC