From ccc13974d22a47995b5f9f674891a39d54aa0620 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 9 Nov 2022 09:53:33 -0800 Subject: refactor settings --- src/components/Pin.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/Pin.svelte b/src/components/Pin.svelte index 2a6bf977..80e003b9 100644 --- a/src/components/Pin.svelte +++ b/src/components/Pin.svelte @@ -1,5 +1,6 @@ diff --git a/src/lib/utils.js b/src/lib/utils.js index c3960487..2bf6b800 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -70,7 +70,7 @@ export function reverseFormat(val, locale) { return Number.isNaN(reversedVal) ? 0 : +reversedVal; } -export let protectedRoutes = [/customers/, /dashboard/, /settings/, /transactions/, /support/]; +export let protectedRoutes = [/customers/, /dashboard/, /settings/, /transactions/]; export const success = (m) => { toast.pop(); diff --git a/src/routes/(app)/[username]/support/+page.server.js b/src/routes/(app)/[username]/support/+page.server.js deleted file mode 100644 index a335ec96..00000000 --- a/src/routes/(app)/[username]/support/+page.server.js +++ /dev/null @@ -1,13 +0,0 @@ -export const actions = { - default: async ({ cookies, request }) => { - let form = Object.fromEntries(await request.formData()); - - try { - await post('/email', form); - } catch (e) { - return invalid(400, { failed: true }); - } - - return { success: true }; - } -}; diff --git a/src/routes/(app)/[username]/support/+page.svelte b/src/routes/(app)/[username]/support/+page.svelte deleted file mode 100644 index cd1cc69f..00000000 --- a/src/routes/(app)/[username]/support/+page.svelte +++ /dev/null @@ -1,76 +0,0 @@ - - -
- {#if form?.success} -

Thank you!

-

Someone will be in touch shortly.

- - - - - {:else} -

- {$t('user.support.header')} -

-
-
- - -
- -
- - -
- -
- -