Redesign dashboard with list layout, sparklines, and search

- Add sparkline component for 7-day price history visualization
- Convert product cards to horizontal list items
- Add search functionality to filter products by name/URL
- Backend returns sparkline data and 7-day price change with products
- Show price trend indicator (green for drops, red for increases)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
clucraft 2026-01-20 19:32:25 -05:00
parent 93dbb5cc7c
commit ba9e52b90f
6 changed files with 519 additions and 80 deletions

View file

@ -41,6 +41,11 @@ export const authApi = {
};
// Products API
export interface SparklinePoint {
price: number;
recorded_at: string;
}
export interface Product {
id: number;
user_id: number;
@ -52,6 +57,8 @@ export interface Product {
created_at: string;
current_price: number | null;
currency: string | null;
sparkline?: SparklinePoint[];
price_change_7d?: number | null;
}
export interface ProductWithStats extends Product {