klg-asutk-app/components/VirtualizedList.tsx
Yuriy 0150aba4f5 Consolidation: KLG ASUTK + PAPA integration
- Unify API: lib/api.ts uses /api/v1, inbox uses /api/inbox (rewrites)
- Remove localhost refs: openapi, inbox page
- Add rewrites: /api/inbox|tmc -> inbox-server, /api/v1 -> FastAPI
- Add stub routes: knowledge/insights, recommendations, search, log-error
- Transfer from PAPA: prompts (inspection, tmc), scripts, supabase, data/tmc-requests
- Fix inbox-server: ORDER BY created_at, package.json
- Remove redundant app/api/inbox/files route (rewrites handle it)
- knowledge/ in gitignore (large PDFs)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 17:18:31 +03:00

35 lines
1.0 KiB
TypeScript

/**
* Компонент виртуализированного списка для больших объемов данных
*/
'use client';
// import { FixedSizeList as List } from 'react-window';
// Временно отключено, так как react-window не установлен
interface VirtualizedListProps<T> {
items: T[];
height: number;
itemHeight: number;
renderItem: (props: { index: number; style: React.CSSProperties; data: T }) => React.ReactNode;
width?: string | number;
}
export default function VirtualizedList<T>({
items,
height,
itemHeight,
renderItem,
width = '100%',
}: VirtualizedListProps<T>) {
// Временно используем простой список, так как react-window не установлен
return (
<div style={{ height, width, overflow: 'auto' }}>
{items.map((item, index) => (
<div key={index} style={{ height: itemHeight }}>
{renderItem({ index, style: {}, data: item })}
</div>
))}
</div>
);
}