️ Improve code in manage layout page (#1681)

Co-authored-by: Thomas Camlong <ajnart@users.noreply.github.com>
This commit is contained in:
Tagaishi
2023-12-07 18:30:49 +01:00
committed by GitHub
parent 217020154b
commit 976634a908

View File

@@ -201,20 +201,14 @@ export const ManageLayout = ({ children }: ManageLayoutProps) => {
const matchesActive = router.pathname.endsWith(item.href);
if (item.href.startsWith('http')) {
return (
<NavLink
{...commonItemProps}
active={matchesActive}
target={item.target}
key={index}
component="a"
/>
);
}
return (
<NavLink {...commonItemProps} active={matchesActive} component={Link} key={index} />
<NavLink
{...commonItemProps}
target={item.target}
active={matchesActive}
component={Link}
key={index}
/>
);
})}
</NavLink>