import { NavLink, Outlet, useLocation } from 'react-router-dom'; import { useEffect, useState } from 'react'; import { api } from '../../services/api-client'; import type { DashboardStats } from '../../types'; import styles from './DoctorLayout.module.css'; const NAV_ITEMS = [ { to: '/dashboard', label: '工作台', icon: '📊' }, { to: '/patients', label: '患者管理', icon: '👥' }, { to: '/consultations', label: '在线问诊', icon: '💬' }, { to: '/reports', label: '报告审核', icon: '📋' }, { to: '/follow-ups', label: '复查随访', icon: '📅' }, ]; export default function DoctorLayout() { const location = useLocation(); const [doctor, setDoctor] = useState(null); useEffect(() => { api.get('/api/doctor/dashboard').then(setDoctor).catch(() => {}); }, []); return (
{/* 侧边栏 */} {/* 内容区 */}
); }