fix: robot target url
This commit is contained in:
@@ -71,6 +71,11 @@ export const RobotSettingsModal = ({ isOpen, handleStart, handleClose, initialSe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const lastPair = robot?.recording.workflow[robot?.recording.workflow.length - 1];
|
||||||
|
|
||||||
|
// Find the `goto` action in `what` and retrieve its arguments
|
||||||
|
const targetUrl = lastPair?.what.find(action => action.action === "goto")?.args?.[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GenericModal
|
<GenericModal
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
@@ -85,7 +90,7 @@ export const RobotSettingsModal = ({ isOpen, handleStart, handleClose, initialSe
|
|||||||
<>
|
<>
|
||||||
<TextField
|
<TextField
|
||||||
label="Robot Target URL"
|
label="Robot Target URL"
|
||||||
value={robot.recording.workflow[0].where.url}
|
value={targetUrl}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user