diff options
| author | Adam Soltys <[email protected]> | 2023-08-09 15:31:05 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-08-09 15:31:05 -0700 |
| commit | 1a85199b499d70fcd6d2b1f6323fec12ef516f15 (patch) | |
| tree | fefa7d99d5a40cef9a7f2f94c168f3c1befac34a /src | |
| parent | 5f0acf374b95a4845bfbb88be7382c6822a13034 (diff) | |
| download | coinos-ui-1a85199b499d70fcd6d2b1f6323fec12ef516f15.tar.gz coinos-ui-1a85199b499d70fcd6d2b1f6323fec12ef516f15.zip | |
don't generate unless necessary
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/generate/+page.svelte | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/routes/(app)/[username]/generate/+page.svelte b/src/routes/(app)/[username]/generate/+page.svelte index 4b394fca..33bf64c4 100644 --- a/src/routes/(app)/[username]/generate/+page.svelte +++ b/src/routes/(app)/[username]/generate/+page.svelte @@ -14,6 +14,11 @@ let gen = async () => { if (!browser) return; + if (user.pubkey) { + goto($loginRedirect || `/${user.username}`, { invalidateAll: true }); + return; + } + if (!$password) $passwordPrompt = true; try { |
