diff --git a/src/components/molecules/RobotDuplicate.tsx b/src/components/molecules/RobotDuplicate.tsx index 3fe6abb7..850614b0 100644 --- a/src/components/molecules/RobotDuplicate.tsx +++ b/src/components/molecules/RobotDuplicate.tsx @@ -103,11 +103,13 @@ export const RobotDuplicationModal = ({ isOpen, handleStart, handleClose, initia const success = await duplicateRecording(robot.recording_meta.id, targetUrl); if (success) { - notify('success', 'Target URL updated successfully.'); + notify('success', 'Robot duplicated successfully.'); handleStart(robot); // Inform parent about the updated robot - handleClose(); // Close the modal + handleClose(); - window.location.reload(); + setTimeout(() => { + window.location.reload(); + }, 1000); } else { notify('error', 'Failed to update the Target URL. Please try again.'); } diff --git a/src/components/molecules/RobotEdit.tsx b/src/components/molecules/RobotEdit.tsx index f68beee2..74b50f62 100644 --- a/src/components/molecules/RobotEdit.tsx +++ b/src/components/molecules/RobotEdit.tsx @@ -116,9 +116,11 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin if (success) { notify('success', 'Robot updated successfully.'); handleStart(robot); // Inform parent about the updated robot - handleClose(); // Close the modal + handleClose(); - window.location.reload(); + setTimeout(() => { + window.location.reload(); + }, 1000); } else { notify('error', 'Failed to update the robot. Please try again.'); }