Merge pull request #897 from getmaxun/extra-divider
fix: conditionally render action names & list limits
This commit is contained in:
@@ -500,7 +500,7 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
|
|||||||
{scrapeListLimits.map((limitInfo, index) => {
|
{scrapeListLimits.map((limitInfo, index) => {
|
||||||
// Get the corresponding scrapeList action to extract its name
|
// Get the corresponding scrapeList action to extract its name
|
||||||
const scrapeListAction = robot?.recording?.workflow?.[limitInfo.pairIndex]?.what?.[limitInfo.actionIndex];
|
const scrapeListAction = robot?.recording?.workflow?.[limitInfo.pairIndex]?.what?.[limitInfo.actionIndex];
|
||||||
const actionName =
|
const actionName =
|
||||||
scrapeListAction?.name ||
|
scrapeListAction?.name ||
|
||||||
`List Limit ${index + 1}`;
|
`List Limit ${index + 1}`;
|
||||||
|
|
||||||
@@ -821,10 +821,19 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
|
|||||||
onChange={(e) => handleTargetUrlChange(e.target.value)}
|
onChange={(e) => handleTargetUrlChange(e.target.value)}
|
||||||
style={{ marginBottom: "20px" }}
|
style={{ marginBottom: "20px" }}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
{renderScrapeListLimitFields() && (
|
||||||
{renderScrapeListLimitFields()}
|
<>
|
||||||
<Divider />
|
<Divider />
|
||||||
{renderActionNameFields()}
|
{renderScrapeListLimitFields()}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{renderActionNameFields() && (
|
||||||
|
<>
|
||||||
|
<Divider />
|
||||||
|
{renderActionNameFields()}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user