import { Link, useNavigate } from 'react-router'; import { useAuth } from '../contexts/AuthContext'; const Home = () => { const { user, isLoading, logout } = useAuth(); const navigate = useNavigate(); const handleLogout = async () => { try { await logout(); navigate('/'); } catch (error) { console.error('Logout failed:', error); alert('Network error during logout. Please try again.'); } }; if (isLoading) { return (

Loading dashboard...

); } if (!user) { return (

Session Expired

Please sign in to access your dashboard.

Sign In Back to Home
); } return (
{/* Navigation */} {/* Main Content */}
{/* Header */}

Dashboard

Track your rhythm game progress and performance

{/* Coming Soon Card */}

Dashboard Coming Soon

We're working hard to bring you an amazing dashboard experience. Track your scores, analyze your performance, and compete with friends - all coming soon!

User ID: {user.id}

Email: {user.email}

); }; export default Home;