Imports tradein-mvp/frontend (38 components) to a claude.ai/design design-system project. Synth-entry build (Next.js app, no dist): - overrides/source-kit.mjs: process.env shim for browser IIFE - preview-provider.tsx: seeded TanStack Query provider (mirrors the repo's offline ui-preview client) so fetch-coupled + auth-gated cards render - previews/*.tsx: authored preview compositions (real fixture data) - conventions.md: README header for the design agent - config.json + NOTES.md: reproducible re-sync inputs
36 lines
992 B
TypeScript
36 lines
992 B
TypeScript
import { ResultPanel } from 'tradein-mvp-frontend';
|
||
|
||
/** Переиспользуемая панель результата мутации скрапера. Успех → JSON-дамп
|
||
* ответа в `.scraper-result`. */
|
||
export const Default = () => (
|
||
<ResultPanel
|
||
mut={{
|
||
isSuccess: true,
|
||
isPending: false,
|
||
error: null,
|
||
data: {
|
||
run_id: 4821,
|
||
source: 'avito',
|
||
status: 'completed',
|
||
anchors_seen: 64,
|
||
lots_scraped: 312,
|
||
houses_matched: 47,
|
||
detail_fetched: 298,
|
||
errors: 0,
|
||
started_at: '2026-05-30T09:12:00Z',
|
||
finished_at: '2026-05-30T09:48:21Z',
|
||
},
|
||
}}
|
||
/>
|
||
);
|
||
|
||
/** Ветка ошибки — красная панель `.scraper-result--error` с текстом сбоя. */
|
||
export const Error_ = () => (
|
||
<ResultPanel
|
||
mut={{
|
||
isSuccess: false,
|
||
isPending: false,
|
||
error: new Error('502 Bad Gateway: upstream avito proxy timeout'),
|
||
}}
|
||
/>
|
||
);
|