feat: set rerender true on duplicate

This commit is contained in:
Rohit
2025-02-01 11:36:19 +05:30
parent f54f8a2323
commit 8176e68c14

View File

@@ -56,7 +56,7 @@ interface RobotSettingsProps {
export const RobotDuplicationModal = ({ isOpen, handleStart, handleClose, initialSettings }: RobotSettingsProps) => {
const { t } = useTranslation();
const [targetUrl, setTargetUrl] = useState<string | undefined>('');
const { recordingId, notify, robot, setRobot } = useGlobalInfoStore();
const { recordingId, notify, robot, setRobot, setRerenderRobots } = useGlobalInfoStore();
useEffect(() => {
if (isOpen) {
@@ -95,6 +95,8 @@ export const RobotDuplicationModal = ({ isOpen, handleStart, handleClose, initia
const success = await duplicateRecording(robot.recording_meta.id, targetUrl);
if (success) {
setRerenderRobots(true);
notify('success', t('robot_duplication.notifications.duplicate_success'));
handleStart(robot);
handleClose();