feat: add DrawerClose to each sidenav link to close sidenav after click
This commit is contained in:
parent
811be2f59b
commit
51b9a8bd1e
@ -151,14 +151,16 @@ function TopNav() {
|
|||||||
</DrawerClose>
|
</DrawerClose>
|
||||||
<div className="flex flex-col justify-start items-start gap-6 text-lg">
|
<div className="flex flex-col justify-start items-start gap-6 text-lg">
|
||||||
<div className="flex flex-col justify-start items-start gap-3">
|
<div className="flex flex-col justify-start items-start gap-3">
|
||||||
<Link to="/" className="font-extrabold">
|
<DrawerClose>
|
||||||
PSW/UI
|
<Link to="/" className="font-extrabold">
|
||||||
</Link>
|
PSW/UI
|
||||||
|
</Link>
|
||||||
|
</DrawerClose>
|
||||||
{RouteObject.mainNav.map((link) => {
|
{RouteObject.mainNav.map((link) => {
|
||||||
return (
|
return (
|
||||||
<Link to={link.path} key={link.path}>
|
<DrawerClose key={link.path}>
|
||||||
{link.name}
|
<Link to={link.path}>{link.name}</Link>
|
||||||
</Link>
|
</DrawerClose>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
@ -172,13 +174,14 @@ function TopNav() {
|
|||||||
<h2 className="font-bold">{categoryName}</h2>
|
<h2 className="font-bold">{categoryName}</h2>
|
||||||
{links.map((link) => {
|
{links.map((link) => {
|
||||||
return (
|
return (
|
||||||
<Link
|
<DrawerClose key={link.path}>
|
||||||
key={link.path}
|
<Link
|
||||||
to={link.path}
|
to={link.path}
|
||||||
className="text-base opacity-75"
|
className="text-base opacity-75"
|
||||||
>
|
>
|
||||||
{link.name}
|
{link.name}
|
||||||
</Link>
|
</Link>
|
||||||
|
</DrawerClose>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user