test 더미 데이터 추가 .
This commit is contained in:
1 parent
9c975ad36a
commit
6fea71ba94
6 files changed
+483
-135
No files matched your search
@@ -17,7 +17,7 @@ interface UrlInputContentProps {
|
||||
}
|
||||
|
||||
const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomplete, onTestData, error }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
const [inputValue, setInputValue] = useState('');
|
||||
const [searchType, setSearchType] = useState<SearchType>('url');
|
||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||
@@ -32,7 +32,8 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
||||
if (!onTestData) return;
|
||||
setIsLoadingTest(true);
|
||||
try {
|
||||
const response = await fetch('/example_analysis.json');
|
||||
const jsonFile = i18n.language === 'en' ? '/example_analysis_en.json' : '/example_analysis.json';
|
||||
const response = await fetch(jsonFile);
|
||||
const data: CrawlingResponse = await response.json();
|
||||
onTestData(data);
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user