import { useNavigate } from 'react-router-dom'; import { PageHeader } from '@/components/layout/PageHeader'; import { Card } from '@/components/common/Card'; import { Badge } from '@/components/common/Badge'; import { useAuth } from '@/hooks/useAuth'; import { useNotificationStore } from '@/stores/notification.store'; import styles from './ProfilePage.module.css'; export function ProfilePage() { const navigate = useNavigate(); const { user, logout } = useAuth(); const { unreadCount } = useNotificationStore(); const handleLogout = () => { if (confirm('确定要退出登录吗?')) { logout(); navigate('/login', { replace: true }); } }; return (
navigate('/profile/edit')}>
{user?.nickname?.[0] || '用'}
{user?.nickname || '用户'}
{user?.phone}
); }