'use client' import type { FC } from 'react' import React, { useCallback } from 'react' import { useTranslation } from 'react-i18next' import CheckboxWithLabel from '../base/checkbox-with-label' import Field from '../base/field' import cn from '@/utils/classnames' import type { CrawlOptions } from '@/models/datasets' const I18N_PREFIX = 'datasetCreation.stepOne.website' type Props = { className?: string payload: CrawlOptions onChange: (payload: CrawlOptions) => void } const Options: FC = ({ className = '', payload, onChange, }) => { const { t } = useTranslation() const handleChange = useCallback((key: keyof CrawlOptions) => { return (value: any) => { onChange({ ...payload, [key]: value, }) } }, [payload, onChange]) return (
) } export default React.memo(Options)