feat: conditionally render last two <Divider />

This commit is contained in:
amhsirak
2025-11-27 00:04:42 +05:30
parent 1ec86242af
commit 9b919d47d7

View File

@@ -791,9 +791,6 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
navigate(basePath); navigate(basePath);
}; };
const scrapeListLimitFields = renderScrapeListLimitFields();
const actionNameFields = renderActionNameFields();
return ( return (
<RobotConfigPage <RobotConfigPage
title={t("robot_edit.title")} title={t("robot_edit.title")}
@@ -824,10 +821,20 @@ 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>