brf/client/public/components/header.tsx
2025-12-13 21:12:08 +01:00

24 lines
558 B
TypeScript

import { h, type FunctionComponent } from 'preact'
import s from './header.module.scss'
import type { Route } from '../../../shared/types.ts'
const Header: FunctionComponent<{ routes: Route[] }> = ({ routes }) => (
<header>
<h1>BRF Tegeltrasten</h1>
<nav className={s.nav}>
<ul>
{routes.map((route) =>
route.nav !== false ? (
<li key={route.path}>
<a href={route.path}>{route.title}</a>
</li>
) : null,
)}
</ul>
</nav>
</header>
)
export default Header