Merge pull request #199 from getmaxun/add-notif

feat: add notification timeout
This commit is contained in:
Karishma Shukla
2024-11-22 23:54:05 +05:30
committed by GitHub
2 changed files with 9 additions and 5 deletions

View File

@@ -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.');
}

View File

@@ -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.');
}