mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-05-12 09:12:40 +02:00
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:
parent
93dbb5cc7c
commit
ba9e52b90f
6 changed files with 519 additions and 80 deletions
|
|
@ -8,11 +8,11 @@ const router = Router();
|
|||
// All routes require authentication
|
||||
router.use(authMiddleware);
|
||||
|
||||
// Get all products for the authenticated user
|
||||
// Get all products for the authenticated user (with sparkline data)
|
||||
router.get('/', async (req: AuthRequest, res: Response) => {
|
||||
try {
|
||||
const userId = req.userId!;
|
||||
const products = await productQueries.findByUserId(userId);
|
||||
const products = await productQueries.findByUserIdWithSparkline(userId);
|
||||
res.json(products);
|
||||
} catch (error) {
|
||||
console.error('Error fetching products:', error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue