/** * Session Carousel Demo * Auto-rotating session cards with navigation */ import React, { useState, useEffect } from 'react' export default function SessionCarousel() { const [currentIndex, setCurrentIndex] = useState(0) const sessions = [ { name: 'Feature: User Authentication', status: 'running', tasks: [ { name: 'Implement login form', status: 'completed' }, { name: 'Add OAuth provider', status: 'in-progress' }, { name: 'Create session management', status: 'pending' }, ], }, { name: 'Bug Fix: Memory Leak', status: 'running', tasks: [ { name: 'Identify leak source', status: 'completed' }, { name: 'Fix cleanup handlers', status: 'in-progress' }, { name: 'Add unit tests', status: 'pending' }, ], }, { name: 'Refactor: API Layer', status: 'planning', tasks: [ { name: 'Design new interface', status: 'pending' }, { name: 'Migrate existing endpoints', status: 'pending' }, { name: 'Update documentation', status: 'pending' }, ], }, ] const statusColors = { completed: 'bg-green-500', 'in-progress': 'bg-amber-500', pending: 'bg-muted', } useEffect(() => { const timer = setInterval(() => { setCurrentIndex((i) => (i + 1) % sessions.length) }, 5000) return () => clearInterval(timer) }, [sessions.length]) return (

Session Carousel (auto-rotates every 5s)

Session {currentIndex + 1} of {sessions.length}
{sessions.map((_, i) => (
{sessions[currentIndex].name} {sessions[currentIndex].status}
{sessions[currentIndex].tasks.map((task, i) => (
{task.name}
))}
) }