refactor(copy-rule): extract context and improve batch clone modal
- Extract MultiCopyPopupContext to standalone context.ts file - Add Task type and improve type safety in BatchCloneModal - Use useRef/useCallback to stabilize batch clone handlers - Add cleanup effect for selectRules in RuleCheckCard on unmount Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { ProFormDependency, ProFormSelect } from '@ant-design/pro-components';
|
||||
import { Divider, Flex, Tag, Typography } from 'antd';
|
||||
import { useContext, useEffect, useMemo } from 'react';
|
||||
import { $t } from '@/utils/i18n';
|
||||
import { MultiCopyPopupContext } from '../MultiCopyPopup';
|
||||
import { MultiCopyPopupContext } from '../context';
|
||||
import RuleCheckCard from './RuleCheckCard';
|
||||
|
||||
type Step1Props = {
|
||||
|
||||
Reference in New Issue
Block a user