diff options
| author | Adam Soltys <[email protected]> | 2026-02-03 16:37:51 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:17 -0800 |
| commit | a4c2b673ded38c31d869f93fdb8b0a656ff01c17 (patch) | |
| tree | 8b143a6a54fc51a4fb686bb26ce586a8297849c5 /src/routes/(static)/support | |
| parent | f7d9ab99ccdfa5cce8e01f827da6fa1d5c5ce4d9 (diff) | |
| download | coinos-ui-a4c2b673ded38c31d869f93fdb8b0a656ff01c17.tar.gz coinos-ui-a4c2b673ded38c31d869f93fdb8b0a656ff01c17.zip | |
fix warnings
Diffstat (limited to 'src/routes/(static)/support')
| -rw-r--r-- | src/routes/(static)/support/+page.svelte | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/routes/(static)/support/+page.svelte b/src/routes/(static)/support/+page.svelte index 4cf9706d..1c0aa76d 100644 --- a/src/routes/(static)/support/+page.svelte +++ b/src/routes/(static)/support/+page.svelte @@ -8,15 +8,19 @@ import { t } from "$lib/translations"; let { data } = $props(); - let { user } = data; + let user = $derived(data.user); - let username = $state(user?.username); + let username = $state(); let email = $state(); let message = $state(); let sent = $state(); let recaptchaSiteKey = PUBLIC_RECAPTCHA_SITE_KEY; let isTor = browser && location.hostname.endsWith(".onion"); + $effect(() => { + if (typeof username === "undefined") username = user?.username; + }); + onMount(() => { if (!isTor && recaptchaSiteKey) { let s = document.createElement("script"); |
