랜딩페이지 검색창 수정 .
This commit is contained in:
1 parent
fa4864e9ef
commit
388351e6d4
2 files changed
+23
-4
No files matched your search
@@ -207,14 +207,14 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
||||
{/* 입력 필드 */}
|
||||
<div className="url-input-field-container" ref={autocompleteRef}>
|
||||
<input
|
||||
type={searchType === 'url' ? 'url' : 'text'}
|
||||
type="text"
|
||||
value={inputValue}
|
||||
onChange={(e) => {
|
||||
let value = e.target.value;
|
||||
|
||||
// URL 모드일 때 앞에 붙은 텍스트 제거 (예: "[네이버 지도] https://...")
|
||||
// URL 모드일 때 URL만 추출 (예: "[네이버 지도] https://...")
|
||||
if (searchType === 'url') {
|
||||
const urlMatch = value.match(/https?:\/\/.+/);
|
||||
const urlMatch = value.match(/https?:\/\/\S+/);
|
||||
if (urlMatch && urlMatch[0] !== value) {
|
||||
value = urlMatch[0];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user