feat: Add component DeepL #1739 (#1870)

### What problem does this PR solve?

feat: Add component DeepL #1739

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-08-08 15:08:31 +08:00
committed by GitHub
parent db8f83104f
commit 439da32234
10 changed files with 173 additions and 7 deletions

View File

@ -3,6 +3,7 @@ import { useTranslate } from '@/hooks/common-hooks';
import { DatePicker, DatePickerProps, Form, Select, Switch } from 'antd';
import dayjs from 'dayjs';
import { useCallback, useMemo } from 'react';
import { useBuildSortOptions } from '../form-hooks';
import { IOperatorForm } from '../interface';
const YearPicker = ({
@ -33,12 +34,7 @@ const YearPicker = ({
const GoogleScholarForm = ({ onValuesChange, form }: IOperatorForm) => {
const { t } = useTranslate('flow');
const options = useMemo(() => {
return ['data', 'relevance'].map((x) => ({
value: x,
label: t(x),
}));
}, [t]);
const options = useBuildSortOptions();
return (
<Form