Improve sidebar navigation by removing unnecessary nesting

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/844ef557-cda0-4b3b-a7a3-e380ec24cde4.jpg
This commit is contained in:
alphaeusmote
2025-04-10 00:35:25 +00:00
parent 396232935f
commit 1a78682695
2 changed files with 27 additions and 31 deletions
+26 -30
View File
@@ -114,21 +114,19 @@ export function Sidebar() {
<nav className="flex-1 py-4 px-2 space-y-1 overflow-y-auto">
{navItems.map((item) => (
<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>
<Link key={item.href} 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>
))}
{filteredAdminItems.length > 0 && (
@@ -137,21 +135,19 @@ export function Sidebar() {
Administration
</div>
{filteredAdminItems.map((item) => (
<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>
<Link key={item.href} 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>
)}
+1 -1
View File
@@ -226,7 +226,7 @@ export class DatabaseStorage implements IStorage {
userId?: string
): Promise<DnsHistory> {
const [historyEntry] = await db.insert(dnsHistory).values({
record_id: recordId,
recordId,
action,
previousValue,
newValue,