import React from 'react'
import { useAuth } from './auth/AuthContext'
import packageJson from '../../package.json'
function Profile({ onNavigate }) {
const { user, logout } = useAuth()
const integrations = [
{ id: 'todoist-integration', name: 'TODOist' },
{ id: 'telegram-integration', name: 'Telegram' },
{ id: 'fitbit-integration', name: 'Fitbit' },
]
const handleLogout = async () => {
if (window.confirm('Вы уверены, что хотите выйти?')) {
await logout()
}
}
return (
{/* Profile Header */}
{user?.name ? user.name.charAt(0).toUpperCase() : user?.email?.charAt(0).toUpperCase() || '?'}
{user?.name || 'Пользователь'}
{user?.email}
{/* Admin & Tracking Buttons */}
{user?.is_admin && (
)}
{/* Features Section */}
Функционал
{/* Integrations Section */}
Интеграции
{integrations.map((integration) => (
))}
{/* Account Section */}
{/* Version Info */}
PlayLife v{packageJson.version}
)
}
export default Profile