import { h } from 'preact'
import s from './header.module.scss'

const Header = ({ 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
