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...
Please sign in to access your dashboard.
Track your rhythm game progress and performance
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}