diff options
Diffstat (limited to 'src/webex/pages/tip.tsx')
-rw-r--r-- | src/webex/pages/tip.tsx | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx index 35e033c0d..10e12d590 100644 --- a/src/webex/pages/tip.tsx +++ b/src/webex/pages/tip.tsx @@ -100,26 +100,12 @@ function TipDisplay(props: { talerTipUri: string }) { ); } -async function main() { - try { +export function createTipPage() { const url = new URL(document.location.href); const talerTipUri = url.searchParams.get("talerTipUri"); if (typeof talerTipUri !== "string") { throw Error("talerTipUri must be a string"); } - ReactDOM.render( - <TipDisplay talerTipUri={talerTipUri} />, - document.getElementById("container")!, - ); - } catch (e) { - // TODO: provide more context information, maybe factor it out into a - // TODO:generic error reporting function or component. - document.body.innerText = i18n.str`Fatal error: "${e.message}".`; - console.error(`got error "${e.message}"`, e); - } + return <TipDisplay talerTipUri={talerTipUri} />; } - -document.addEventListener("DOMContentLoaded", () => { - main(); -}); |