fixed lint issues
This commit is contained in:
parent
b67fe48f72
commit
519d24722e
12 changed files with 54 additions and 46 deletions
|
|
@ -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('/')) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue