From 8d938da9585cecd9c75c716024cb4b898758fd46 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 25 Aug 2025 19:53:47 +0530 Subject: [PATCH] refactor: move handleBack() --- .../robot/pages/RobotIntegrationPage.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/robot/pages/RobotIntegrationPage.tsx b/src/components/robot/pages/RobotIntegrationPage.tsx index 68bffd05..16876d8a 100644 --- a/src/components/robot/pages/RobotIntegrationPage.tsx +++ b/src/components/robot/pages/RobotIntegrationPage.tsx @@ -677,6 +677,13 @@ export const RobotIntegrationPage = ({ else return date.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }); }; + const handleBack = () => { + if (!recordingId) return; + setSelectedIntegrationType(null); + const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots"; + navigate(`${basePath}/${recordingId}/integrate`); + }; + // --- MAIN RENDER --- if (!selectedIntegrationType && !integrationType) { return ( @@ -758,13 +765,6 @@ export const RobotIntegrationPage = ({ ); } - const handleBack = () => { - if (!recordingId) return; - setSelectedIntegrationType(null); - const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots"; - navigate(`${basePath}/${recordingId}/integrate`); - }; - return (