import { h } from 'preact'

const Header = ({ routes }) => (
  <header>
    <h1>BRF Tegeltrasten</h1>
    <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
