fix:提交修复6个问题
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { NavLink, Outlet } from 'react-router-dom';
|
||||
import { usePartnerSession } from '../contexts/PartnerSessionContext';
|
||||
|
||||
const TABS = [
|
||||
{ to: '/stores/new', icon: 'add_business', label: '录入新店' },
|
||||
{ to: '/stores', end: true, icon: 'store', label: '我的门店' },
|
||||
] as const;
|
||||
|
||||
export default function SubAccountLayout() {
|
||||
const { account, logout } = usePartnerSession();
|
||||
|
||||
return (
|
||||
<>
|
||||
<header className="header app-page-header partner-sub-header">
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }}>
|
||||
<div>
|
||||
<h1 className="app-page-title" style={{ fontSize: 18 }}>{account?.name || '拓店账号'}</h1>
|
||||
<p className="label-md text-muted">{account?.companyName || '门店入驻'}</p>
|
||||
</div>
|
||||
<button type="button" className="partner-menu-icon" onClick={logout} aria-label="退出登录">
|
||||
<span className="material-symbols-outlined">logout</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<Outlet />
|
||||
<nav className="app-tabbar">
|
||||
{TABS.map((tab) => (
|
||||
<NavLink
|
||||
key={tab.to}
|
||||
to={tab.to}
|
||||
end={'end' in tab ? tab.end : undefined}
|
||||
className={({ isActive }) => `app-tabbar-item${isActive ? ' active' : ''}`}
|
||||
>
|
||||
<span className="material-symbols-outlined app-tabbar-icon">{tab.icon}</span>
|
||||
<span className="app-tabbar-label">{tab.label}</span>
|
||||
</NavLink>
|
||||
))}
|
||||
</nav>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user