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, supportedLangs, onLogout, children }: { title: string, iconLinkURL: string, children?: ComponentChildren, onLogout: (() => void) | undefined, sites: [string, string][], supportedLangs: string[] }): VNode { const { i18n } = useTranslationContext(); const [open, setOpen] = useState(false) return
{title}
{sites.length !== 0 &&
{/* */} {sites.map(([name, url]) => { return {name} })}
}
{open && }
}