mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-31 12:48:03 +00:00
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:
@@ -114,21 +114,19 @@ export function Sidebar() {
|
|||||||
|
|
||||||
<nav className="flex-1 py-4 px-2 space-y-1 overflow-y-auto">
|
<nav className="flex-1 py-4 px-2 space-y-1 overflow-y-auto">
|
||||||
{navItems.map((item) => (
|
{navItems.map((item) => (
|
||||||
<div key={item.href}>
|
<Link key={item.href} href={item.href}>
|
||||||
<Link href={item.href}>
|
<div
|
||||||
<div
|
className={cn(
|
||||||
className={cn(
|
"flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer",
|
||||||
"flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer",
|
location === item.href
|
||||||
location === item.href
|
? "bg-primary text-primary-foreground"
|
||||||
? "bg-primary text-primary-foreground"
|
: "hover:bg-accent hover:text-accent-foreground"
|
||||||
: "hover:bg-accent hover:text-accent-foreground"
|
)}
|
||||||
)}
|
>
|
||||||
>
|
{item.icon}
|
||||||
{item.icon}
|
{item.title}
|
||||||
{item.title}
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{filteredAdminItems.length > 0 && (
|
{filteredAdminItems.length > 0 && (
|
||||||
@@ -137,21 +135,19 @@ export function Sidebar() {
|
|||||||
Administration
|
Administration
|
||||||
</div>
|
</div>
|
||||||
{filteredAdminItems.map((item) => (
|
{filteredAdminItems.map((item) => (
|
||||||
<div key={item.href}>
|
<Link key={item.href} href={item.href}>
|
||||||
<Link href={item.href}>
|
<div
|
||||||
<div
|
className={cn(
|
||||||
className={cn(
|
"mt-1 flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer",
|
||||||
"mt-1 flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer",
|
location === item.href
|
||||||
location === item.href
|
? "bg-primary text-primary-foreground"
|
||||||
? "bg-primary text-primary-foreground"
|
: "hover:bg-accent hover:text-accent-foreground"
|
||||||
: "hover:bg-accent hover:text-accent-foreground"
|
)}
|
||||||
)}
|
>
|
||||||
>
|
{item.icon}
|
||||||
{item.icon}
|
{item.title}
|
||||||
{item.title}
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ export class DatabaseStorage implements IStorage {
|
|||||||
userId?: string
|
userId?: string
|
||||||
): Promise<DnsHistory> {
|
): Promise<DnsHistory> {
|
||||||
const [historyEntry] = await db.insert(dnsHistory).values({
|
const [historyEntry] = await db.insert(dnsHistory).values({
|
||||||
record_id: recordId,
|
recordId,
|
||||||
action,
|
action,
|
||||||
previousValue,
|
previousValue,
|
||||||
newValue,
|
newValue,
|
||||||
|
|||||||
Reference in New Issue
Block a user