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 (