From 714c77e0c4a4be1104782da483d67a9dad0c4a47 Mon Sep 17 00:00:00 2001 From: RohitR311 Date: Fri, 22 Nov 2024 23:40:05 +0530 Subject: [PATCH] feat: add notification timeout --- src/components/molecules/RobotEdit.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/RobotEdit.tsx b/src/components/molecules/RobotEdit.tsx index f68beee2..7148ba56 100644 --- a/src/components/molecules/RobotEdit.tsx +++ b/src/components/molecules/RobotEdit.tsx @@ -118,7 +118,9 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin 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 robot. Please try again.'); }