Skip to content

Commit 3cd8150

Browse files
committed
[FIX] nav
1 parent 45e9648 commit 3cd8150

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/react-tools-demo/src/layout/MainLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ export default function MainLayout() {
6262
key={name}
6363
className={pathname === ("/" + name) ? 'active' : ''}
6464
to={"/" + name}
65-
onClick={()=>containerRef.current?.scrollTo(0,0)}
65+
onClick={() => {
66+
containerRef.current?.scrollTo(0, 0);
67+
closeNav();
68+
}}
6669
>
6770
{name}
6871
</Link>

0 commit comments

Comments
 (0)