aboutsummaryrefslogtreecommitdiff
path: root/packages/web-util/src/components
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-11-22 13:33:44 -0300
committerSebastian <sebasjm@gmail.com>2023-11-22 15:20:28 -0300
commit33c0267b37eecf44dc9f04e124eb44d27cba700c (patch)
tree9d5549dbb5a415b44005ab05711fc66c4643cbc9 /packages/web-util/src/components
parent5eec408d9fb5e8c2375937166997ef8267a4053c (diff)
downloadwallet-core-33c0267b37eecf44dc9f04e124eb44d27cba700c.tar.xz
settings and preferences, getting conversion info
Diffstat (limited to 'packages/web-util/src/components')
-rw-r--r--packages/web-util/src/components/Header.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/web-util/src/components/Header.tsx b/packages/web-util/src/components/Header.tsx
index bde0688dc..0ffc57417 100644
--- a/packages/web-util/src/components/Header.tsx
+++ b/packages/web-util/src/components/Header.tsx
@@ -3,7 +3,8 @@ 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 {
+export function Header({ title, iconLinkURL, sites, supportedLangs, onLogout, children }:
+ { title: string, iconLinkURL: string, children?: ComponentChildren, onLogout: (() => void) | undefined, sites: Array<Array<string>>, supportedLangs: string[] }): VNode {
const { i18n } = useTranslationContext();
const [open, setOpen] = useState(false)
return <Fragment>
@@ -28,7 +29,9 @@ export function Header({ title, iconLinkURL, sites, supportedLangs, onLogout, ch
{sites.length !== 0 &&
<div class="flex flex-1 space-x-4">
{/* <!-- Current: "bg-indigo-700 text-white", Default: "text-white hover:bg-indigo-500 hover:bg-opacity-75" --> */}
- {sites.map(([name, url]) => {
+ {sites.map((site) => {
+ if (site.length !== 2) return;
+ const [name, url] = site
return <a href={url} class="text-white hover:bg-indigo-500 hover:bg-opacity-75 rounded-md py-2 px-3 text-sm font-medium">{name}</a>
})}
</div>