forked from 77media/video-flow
H5个人信息页路由跳转并收起弹窗
This commit is contained in:
parent
fff358b2d8
commit
6f2a0926f3
@ -406,14 +406,17 @@ export default function H5TopBar({ onSelectHomeTab }: H5TopBarProps) {
|
||||
<div data-alt="menu-links" className="rounded-xl border border-black/10 dark:border-white/10 divide-y divide-black/10 dark:divide-white/10 overflow-hidden">
|
||||
{navigationItems.map((group) => (
|
||||
group.items.map((nav) => {
|
||||
const isActive = pathname === nav.href || pathname.startsWith(nav.href + '/');
|
||||
const isActive = pathname === nav.href;
|
||||
return (
|
||||
<button
|
||||
key={nav.href}
|
||||
data-alt={`link-${nav.name.toLowerCase()}`}
|
||||
aria-current={isActive ? 'page' : undefined}
|
||||
className={`w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-white/10 ${isActive ? 'bg-gray-100 dark:bg-white/10' : ''}`}
|
||||
onClick={() => router.push(nav.href)}
|
||||
onClick={() => {
|
||||
router.push(nav.href);
|
||||
setDrawerOpen(false);
|
||||
}}
|
||||
>
|
||||
<nav.icon className="h-4 w-4" />
|
||||
<span>{nav.name}</span>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user