From 8851572f78a70c7bd02a3d669dc103459323ed8d Mon Sep 17 00:00:00 2001 From: secondl1ght <85003930+secondl1ght@users.noreply.github.com> Date: Sat, 30 Jul 2022 06:52:55 -0600 Subject: add 404 and error page, redirect to login if trying to access w/o user --- src/routes/invoice/[amount].svelte | 232 +++++++++++++++++++------------------ 1 file changed, 119 insertions(+), 113 deletions(-) (limited to 'src/routes/invoice') diff --git a/src/routes/invoice/[amount].svelte b/src/routes/invoice/[amount].svelte index 4c1ec199..2cf16e37 100644 --- a/src/routes/invoice/[amount].svelte +++ b/src/routes/invoice/[amount].svelte @@ -8,6 +8,10 @@ export let text; export let amount; + if (!$user && typeof window !== 'undefined') { + window.location = '/login'; + } + let tipPercent = 0; const setRate = ($invoiceAmountFiat / $invoiceAmount) * 100000000; @@ -83,131 +87,133 @@ }); - - -