import { useState } from "preact/hooks"; import { LangSelector, useTranslationContext } from "../index.browser.js"; import { ComponentChildren, Fragment, VNode, h } from "preact"; import logo from "../assets/logo-2021.svg"; export function Header({ title, iconLinkURL, sites, onLogout, children }: { title: string, iconLinkURL: string, children?: ComponentChildren, onLogout: (() => void) | undefined, sites: Array>, supportedLangs: string[] }): VNode { const { i18n } = useTranslationContext(); const [open, setOpen] = useState(false) return
{title}
{sites.map((site) => { if (site.length !== 2) return; const [name, url] = site return })}
{open && }
}