fix: add keys in TopNav
This commit is contained in:
parent
10d4da7626
commit
210afb1b77
@ -155,17 +155,25 @@ function TopNav() {
|
|||||||
PSW/UI
|
PSW/UI
|
||||||
</Link>
|
</Link>
|
||||||
{RouteObject.mainNav.map((link) => {
|
{RouteObject.mainNav.map((link) => {
|
||||||
return <Link to={link.path}>{link.name}</Link>;
|
return (
|
||||||
|
<Link to={link.path} key={link.path}>
|
||||||
|
{link.name}
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
{Object.entries(RouteObject.sideNav).map(
|
{Object.entries(RouteObject.sideNav).map(
|
||||||
([categoryName, links]) => {
|
([categoryName, links]) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col justify-start items-start gap-3">
|
<div
|
||||||
|
className="flex flex-col justify-start items-start gap-3"
|
||||||
|
key={categoryName}
|
||||||
|
>
|
||||||
<h2 className="font-bold">{categoryName}</h2>
|
<h2 className="font-bold">{categoryName}</h2>
|
||||||
{links.map((link) => {
|
{links.map((link) => {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
key={link.path}
|
||||||
to={link.path}
|
to={link.path}
|
||||||
className="text-base opacity-75"
|
className="text-base opacity-75"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user