feat: enqueue links

This commit is contained in:
karishmas6
2024-06-22 19:59:35 +05:30
parent d0c75cdeb1
commit 4f36f93076

View File

@@ -0,0 +1,32 @@
import React, { forwardRef, useImperativeHandle } from 'react';
import { Stack, TextField } from "@mui/material";
import { WarningText } from "../../atoms/texts";
import WarningIcon from "@mui/icons-material/Warning";
import InfoIcon from "@mui/icons-material/Info";
export const EnqueueLinksSettings = forwardRef((props, ref) => {
const [settings, setSettings] = React.useState<string>('');
useImperativeHandle(ref, () => ({
getSettings() {
return settings;
}
}));
return (
<Stack direction="column">
<TextField
sx={{marginLeft: '15px', marginRight: '15px'}}
type="string"
label="Selector"
required
onChange={(e) => setSettings(e.target.value)}
/>
<WarningText>
<InfoIcon color='warning'/>
Reads elements targeted by the selector and stores their links in a queue.
Those pages are then processed using the same workflow as the initial page
(in parallel if the maxConcurrency parameter is greater than 1).
</WarningText>
</Stack>
);
});