import { JSX } from 'preact/jsx-runtime' import { IconLink } from '../components/IconLink.tsx' import { Icons } from '../components/icons.tsx' import { IS_BROWSER } from '$fresh/runtime.ts' interface NavItem { text: string href: string icon?: keyof typeof Icons } const navItems: NavItem[] = [ { text: 'Budgets', href: '/bank/budgets', icon: 'SomeIcon', }, { text: 'Transactions', href: '/bank/transactions', }, { text: 'Something', href: '/bank/something', }, ] export function Nav(_props: JSX.HTMLAttributes) { // TODO: on nav, the `active` field is not updated globalThis.addEventListener('popstate', (ev) => { console.log('popstate', ev) }) return ( ) }