chore: lint
This commit is contained in:
@@ -62,7 +62,7 @@ export const PairEditForm: FC<PairEditFormProps> = (
|
|||||||
: {},
|
: {},
|
||||||
what: [],
|
what: [],
|
||||||
};
|
};
|
||||||
const validationError = Preprocessor.validateWorkflow({workflow: [whereFromPair]});
|
const validationError = Preprocessor.validateWorkflow({ workflow: [whereFromPair] });
|
||||||
setErrors({ ...errors, where: null });
|
setErrors({ ...errors, where: null });
|
||||||
if (validationError) {
|
if (validationError) {
|
||||||
setErrors({ ...errors, where: validationError.message });
|
setErrors({ ...errors, where: validationError.message });
|
||||||
@@ -72,9 +72,9 @@ export const PairEditForm: FC<PairEditFormProps> = (
|
|||||||
whatFromPair = {
|
whatFromPair = {
|
||||||
where: {},
|
where: {},
|
||||||
what: pairProps.what && pairProps.what !== '[{"action":"","args":[""] }]'
|
what: pairProps.what && pairProps.what !== '[{"action":"","args":[""] }]'
|
||||||
? JSON.parse(pairProps.what): [],
|
? JSON.parse(pairProps.what) : [],
|
||||||
};
|
};
|
||||||
const validationErrorWhat = Preprocessor.validateWorkflow({workflow: [whatFromPair]});
|
const validationErrorWhat = Preprocessor.validateWorkflow({ workflow: [whatFromPair] });
|
||||||
setErrors({ ...errors, "what": null });
|
setErrors({ ...errors, "what": null });
|
||||||
if (validationErrorWhat) {
|
if (validationErrorWhat) {
|
||||||
setErrors({ ...errors, what: validationErrorWhat.message });
|
setErrors({ ...errors, what: validationErrorWhat.message });
|
||||||
@@ -122,9 +122,9 @@ export const PairEditForm: FC<PairEditFormProps> = (
|
|||||||
marginTop: "36px",
|
marginTop: "36px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography sx={{marginBottom:'30px'}} variant='h5'>Raw pair edit form:</Typography>
|
<Typography sx={{ marginBottom: '30px' }} variant='h5'>Raw pair edit form:</Typography>
|
||||||
<TextField sx={{
|
<TextField sx={{
|
||||||
display:"block",
|
display: "block",
|
||||||
marginBottom: "20px"
|
marginBottom: "20px"
|
||||||
}} id="index" label="Index" type="number"
|
}} id="index" label="Index" type="number"
|
||||||
InputProps={{ inputProps: { min: 1 } }}
|
InputProps={{ inputProps: { min: 1 } }}
|
||||||
@@ -141,14 +141,14 @@ export const PairEditForm: FC<PairEditFormProps> = (
|
|||||||
defaultValue={pairProps.id}
|
defaultValue={pairProps.id}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
/>
|
/>
|
||||||
<TextField multiline sx={{marginBottom: "20px"}}
|
<TextField multiline sx={{ marginBottom: "20px" }}
|
||||||
id="where" label="Where" variant="outlined" onChange={handleInputChange}
|
id="where" label="Where" variant="outlined" onChange={handleInputChange}
|
||||||
defaultValue={ where || '{"url":"","selectors":[""]}' }
|
defaultValue={where || '{"url":"","selectors":[""]}'}
|
||||||
error={!!errors.where} helperText={errors.where}/>
|
error={!!errors.where} helperText={errors.where} />
|
||||||
<TextField multiline sx={{marginBottom: "20px"}}
|
<TextField multiline sx={{ marginBottom: "20px" }}
|
||||||
id="what" label="What" variant="outlined" onChange={handleInputChange}
|
id="what" label="What" variant="outlined" onChange={handleInputChange}
|
||||||
defaultValue={ what || '[{"action":"","args":[""]}]' }
|
defaultValue={what || '[{"action":"","args":[""]}]'}
|
||||||
error={!!errors.what} helperText={errors.what}/>
|
error={!!errors.what} helperText={errors.what} />
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|||||||
Reference in New Issue
Block a user