'use client' import type { FC } from 'react' import React, { useCallback } from 'react' import { useTranslation } from 'react-i18next' import cn from '@/utils/classnames' import type { CrawlResultItem as CrawlResultItemType } from '@/models/datasets' import Checkbox from '@/app/components/base/checkbox' type Props = { payload: CrawlResultItemType isChecked: boolean isPreview: boolean onCheckChange: (checked: boolean) => void onPreview: () => void } const CrawledResultItem: FC = ({ isPreview, payload, isChecked, onCheckChange, onPreview, }) => { const { t } = useTranslation() const handleCheckChange = useCallback(() => { onCheckChange(!isChecked) }, [isChecked, onCheckChange]) return (
{payload.title}
{t('datasetCreation.stepOne.website.preview')}
{payload.source_url}
) } export default React.memo(CrawledResultItem)