Skip to content

Commit

Permalink
🐛 fix: correctly use Link element
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 authored Nov 1, 2022
1 parent f0bf25f commit 4e156e0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions apps/client/src/components/admin/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,15 @@ function SidebarItem({ route, href, text, isActive, onRouteClick }: ItemProps) {

return (
<li className="px-2">
<Link href={href}>
<a
onClick={onRouteClick}
className={classNames(
"transition-colors rounded-md block px-4 py-1 dark:text-white hover:bg-gray-200 dark:hover:bg-secondary",
isActive && "bg-gray-300 dark:bg-secondary dark:text-white",
)}
>
{text}
</a>
<Link
onClick={onRouteClick}
className={classNames(
"transition-colors rounded-md block px-4 py-1 dark:text-white hover:bg-gray-200 dark:hover:bg-secondary",
isActive && "bg-gray-300 dark:bg-secondary dark:text-white",
)}
href={href}
>
{text}
</Link>
</li>
);
Expand Down

0 comments on commit 4e156e0

Please sign in to comment.