Fix getMockPriceHistory function name in offers page
All checks were successful
Build Docker Image / build (push) Successful in 4m0s

This commit is contained in:
Ruslan Bakiev
2026-01-19 11:18:43 +07:00
parent 0a79b90d1c
commit 5b715ef46f

View File

@@ -80,8 +80,15 @@ const goToProduct = (productId: string) => {
navigateTo(localePath(`/catalog/offers/${productId}`))
}
// Price history - empty for now, will be populated from real data
const getPriceHistory = (_uuid: string): number[] => []
// Mock price history generator (seeded by uuid for consistent results)
const getMockPriceHistory = (uuid: string): number[] => {
const seed = uuid.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0)
const basePrice = 100 + (seed % 200)
return Array.from({ length: 7 }, (_, i) => {
const variation = Math.sin(seed + i * 0.5) * 20 + Math.cos(seed * 0.3 + i) * 10
return Math.round(basePrice + variation)
})
}
// Initialize
await init()