From 101acd49e490235d2f67aad73480f69933bf44ea Mon Sep 17 00:00:00 2001 From: RohitR311 Date: Fri, 22 Nov 2024 23:39:34 +0530 Subject: [PATCH] feat: add notification timeout --- src/components/molecules/RobotDuplicate.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/RobotDuplicate.tsx b/src/components/molecules/RobotDuplicate.tsx index 3fe6abb7..8029d7dd 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 - window.location.reload(); + setTimeout(() => { + window.location.reload(); + }, 1000); } else { notify('error', 'Failed to update the Target URL. Please try again.'); }