cherry-studio/packages/catalog/web/components/navigation.tsx
suyao 67f726afb7
feat: implement API client with SWR integration for catalog management
- Added a new Textarea component for user input.
- Configured ESLint with custom rules and global ignores.
- Developed a comprehensive API client with CRUD operations and error handling.
- Defined catalog types and schemas using Zod for type safety.
- Created utility functions for class name merging and validation.
- Established Next.js configuration for API rewrites and static file headers.
- Set up package.json with necessary dependencies and scripts.
- Configured PostCSS for Tailwind CSS integration.
- Added SVG assets for UI components.
- Configured TypeScript with strict settings and module resolution.
2025-12-01 13:07:23 +08:00

33 lines
741 B
TypeScript

'use client'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { cn } from '@/lib/utils'
const navigation = [
{ name: 'Models', href: '/' },
{ name: 'Providers', href: '/providers' },
{ name: 'Overrides', href: '/overrides' }
]
export function Navigation() {
const pathname = usePathname()
return (
<nav className="flex space-x-8">
{navigation.map((item) => (
<Link
key={item.name}
href={item.href}
className={cn(
'text-sm font-medium transition-colors hover:text-primary',
pathname === item.href ? 'text-foreground' : 'text-muted-foreground'
)}>
{item.name}
</Link>
))}
</nav>
)
}