'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { useTranslations } from 'next-intl' import { useAccount } from 'wagmi' import { useConnectModal } from '@rainbow-me/rainbowkit' import { shortenAddress } from '@/lib/utils' const navItems = [ { key: 'overview', href: '' }, { key: 'posts', href: '/posts' }, { key: 'trades', href: '/trades' }, { key: 'analytics', href: '/analytics' }, ] as const interface NavbarProps { locale: string } export default function Navbar({ locale }: NavbarProps) { const t = useTranslations('nav') const pathname = usePathname() const { address, isConnected } = useAccount() const { openConnectModal } = useConnectModal() function isActive(href: string) { const full = `/${locale}${href}` if (href === '') return pathname === `/${locale}` || pathname === `/${locale}/` return pathname.startsWith(full) } return ( ) }