From 07f25566ca51b7faf6462a57d15f4ebbfc733ab0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 6 Apr 2020 21:05:51 +0530 Subject: start spring cleaning, use rollup instead of both webpack and rollup --- src/webex/pages/tip.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/webex/pages/tip.tsx') 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( - , - 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 ; } - -document.addEventListener("DOMContentLoaded", () => { - main(); -}); -- cgit v1.2.3