import { classifyTalerUri, TalerUriType } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { platform } from "../platform/api"; import { Button, ButtonSuccess, InputWithLabel } from "../components/styled"; import { useTranslationContext } from "../context/translation"; export interface Props { onCancel: () => void; } export function AddNewActionView({ onCancel }: Props): VNode { const [url, setUrl] = useState(""); const uriType = classifyTalerUri(url); const { i18n } = useTranslationContext(); function redirectToWallet() { platform.openWalletURIFromPopup(uriType, url); } return (
setUrl(e.currentTarget.value)} />
); }