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,11 +821,21 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
onChange={(e) => handleTargetUrlChange(e.target.value)} onChange={(e) => handleTargetUrlChange(e.target.value)}
style={{ marginBottom: "20px" }} style={{ marginBottom: "20px" }}
/> />
{renderScrapeListLimitFields() && (
<>
<Divider /> <Divider />
{renderScrapeListLimitFields()} {renderScrapeListLimitFields()}
</>
)}
{renderActionNameFields() && (
<>
<Divider /> <Divider />
{renderActionNameFields()} {renderActionNameFields()}
</> </>
)}
</>
)} )}
</Box> </Box>
</> </>