Improve sidebar navigation by wrapping links in divs.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/238b3770-9672-4505-8afd-be8764dfd6be.jpg
This commit is contained in:
alphaeusmote
2025-04-10 00:28:17 +00:00
2 changed files with 31 additions and 27 deletions
@@ -5,7 +5,7 @@ import { Loader2 } from "lucide-react";
import { Card, CardContent, CardTitle } from "@/components/ui/card";
interface RecentActivityProps {
domainId?: number;
domainId?: string;
}
export function RecentActivity({ domainId }: RecentActivityProps) {
+30 -26
View File
@@ -114,19 +114,21 @@ export function Sidebar() {
<nav className="flex-1 py-4 px-2 space-y-1 overflow-y-auto">
{navItems.map((item) => (
<Link key={item.href} href={item.href}>
<a
className={cn(
"flex items-center px-3 py-2 text-sm font-medium rounded-md",
location === item.href
? "bg-primary text-primary-foreground"
: "hover:bg-accent hover:text-accent-foreground"
)}
>
{item.icon}
{item.title}
</a>
</Link>
<div key={item.href}>
<Link href={item.href}>
<div
className={cn(
"flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer",
location === item.href
? "bg-primary text-primary-foreground"
: "hover:bg-accent hover:text-accent-foreground"
)}
>
{item.icon}
{item.title}
</div>
</Link>
</div>
))}
{filteredAdminItems.length > 0 && (
@@ -135,19 +137,21 @@ export function Sidebar() {
Administration
</div>
{filteredAdminItems.map((item) => (
<Link key={item.href} href={item.href}>
<a
className={cn(
"mt-1 flex items-center px-3 py-2 text-sm font-medium rounded-md",
location === item.href
? "bg-primary text-primary-foreground"
: "hover:bg-accent hover:text-accent-foreground"
)}
>
{item.icon}
{item.title}
</a>
</Link>
<div key={item.href}>
<Link href={item.href}>
<div
className={cn(
"mt-1 flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer",
location === item.href
? "bg-primary text-primary-foreground"
: "hover:bg-accent hover:text-accent-foreground"
)}
>
{item.icon}
{item.title}
</div>
</Link>
</div>
))}
</div>
)}