Send to screenshot service only the domains that are marked

This commit is contained in:
Kuba Orlik 2022-07-15 12:11:24 +02:00
parent 520a26923e
commit adf82b3dd6

View File

@ -157,7 +157,12 @@ export default function ScreenshotGenerator({
className="sv_next_btn"
onClick={async () => {
setMode('in_progress');
const task = await createTask(visited_url, Object.keys(clusters));
const task = await createTask(
visited_url,
Object.values(clusters)
.filter((cluster) => cluster.hasMarks())
.map((cluster) => cluster.id)
);
const urlArr = task.url.split('/');
setTaskId(urlArr[urlArr.length - 1]);
const response = await subscribeTask(task.url);