Fix getMockPriceHistory function name in offers page
All checks were successful
Build Docker Image / build (push) Successful in 4m0s
All checks were successful
Build Docker Image / build (push) Successful in 4m0s
This commit is contained in:
@@ -80,8 +80,15 @@ const goToProduct = (productId: string) => {
|
|||||||
navigateTo(localePath(`/catalog/offers/${productId}`))
|
navigateTo(localePath(`/catalog/offers/${productId}`))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Price history - empty for now, will be populated from real data
|
// Mock price history generator (seeded by uuid for consistent results)
|
||||||
const getPriceHistory = (_uuid: string): number[] => []
|
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
|
// Initialize
|
||||||
await init()
|
await init()
|
||||||
|
|||||||
Reference in New Issue
Block a user