import { useAppConfig } from "../AppConfig/AppConfig.tsx"; import type { AsyncOp } from "../async-op.ts"; import { cx } from "../class-names.ts"; import { LoadingIndicator } from "../LoadingIndicator.js"; import { code } from "./style.css.ts"; type QRCodeProps = { url: AsyncOp; className?: string; }; export function QRCode(props: QRCodeProps) { const { url: result } = props; const { client } = useAppConfig(); return (
{result.unpack( (url) => { const params = new URLSearchParams({ url }); const src = `${client.origin}/qr?${params}`; return ( ); }, () => { return ( ); }, () => { return ; }, )}
); }