fixed lint issues

This commit is contained in:
Boki 2025-06-23 17:07:30 -04:00
parent b67fe48f72
commit 519d24722e
12 changed files with 54 additions and 46 deletions

View file

@ -10,7 +10,7 @@ export function Layout() {
// Determine title from current route
const getTitle = () => {
const path = location.pathname.replace('/', '');
if (!path || path === 'dashboard') return 'Dashboard';
if (!path || path === 'dashboard') {return 'Dashboard';}
// Handle nested routes
if (path.includes('/')) {

View file

@ -1,4 +1,5 @@
import { navigation } from '@/lib/constants';
import type { NavigationItem } from '@/lib/constants';
import { cn } from '@/lib/utils';
import { Dialog, Transition } from '@headlessui/react';
import { XMarkIcon, ChevronDownIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
@ -101,7 +102,7 @@ function SidebarContent() {
setExpandedItems(newExpanded);
};
const isChildActive = (children: any[]) => {
const isChildActive = (children: NavigationItem[]) => {
return children.some(child => location.pathname === child.href);
};
@ -148,7 +149,7 @@ function SidebarContent() {
{item.children.map(child => (
<li key={child.name}>
<NavLink
to={child.href!}
to={child.href || ''}
className={({ isActive }) =>
cn(
isActive
@ -180,7 +181,7 @@ function SidebarContent() {
</>
) : (
<NavLink
to={item.href!}
to={item.href || ''}
className={({ isActive }) =>
cn(
isActive