/** @jsxImportSource hono/jsx */ import { Layout } from "./base" export interface SelectProps { providers?: Record< string, { hide?: boolean display?: string } > } export function Select(props?: SelectProps) { return async ( providers: Record, _req: Request, ): Promise => { const jsx = (

Welcome to Nestri

{Object.entries(providers).map(([key, type]) => { const match = props?.providers?.[key] if (match?.hide) return const icon = ICON[key] return ( ) })}
) return new Response(jsx.toString(), { headers: { "Content-Type": "text/html", }, }) } } const DISPLAY: Record = { twitch: "Twitch", google: "Google", github: "GitHub", discord: "Discord", password: "Password", } const ICON: Record = { code: ( ), password: ( // ), twitch: ( ), google: ( ), github: ( ), discord: ( ) }