The carousel was resetting to index 0 every 10 seconds when the dashboard refreshed data from the API. This caused the carousel to show: - 0s: test 2 (index 0) - 5s: test again (index 1) - 10s: DATA REFRESH → reset to test 2 (index 0) ❌ Fixed by: - Preserving currentUpcomingIndex across renderEvents() calls - Only reset index if it's out of range for new data - Render the currently active event instead of always starting at 0 - Added logging to show index preservation Now the carousel cycles continuously through all 4 events without resetting when the page refreshes data every 10 seconds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
37 KiB
37 KiB