gendesign/.design-sync/previews/ScheduleControl.tsx

25 lines
863 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { ScheduleControl } from 'tradein-mvp-frontend';
/** Расписание + ручной запуск city-sweep. Фетчит /admin/scrape/schedules через
* useSchedules (статус-блок fetch-coupled), но форма настроек (окно МСК,
* pages/anchor, detail top-N, delay, радиус, enrich) рендерится всегда —
* полный styled-каркас формы. paramConfig — avito-дефолты (с detail-параметрами). */
const AVITO_PARAMS = {
hasDetailParams: true,
hasEnrichAddress: false,
defaults: {
pages_per_anchor: 3,
radius_m: 1500,
request_delay_sec: 4,
detail_top_n: 12,
enrich_houses: true,
},
};
export const Default = () => (
<ScheduleControl
source="avito"
scheduleSource="avito_city_sweep"
paramConfig={AVITO_PARAMS}
/>
);