diff options
| author | Adam Soltys <[email protected]> | 2023-08-09 15:30:23 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-08-09 15:30:23 -0700 |
| commit | 92ff34396242e2a22d0c3f8248dc08451afc7cab (patch) | |
| tree | 5ea2e6c43e5c7e7be0bd0de924a893e200235574 /src | |
| parent | 3a829a393e4e3406d21bef96c98251bac76eab51 (diff) | |
| download | coinos-ui-92ff34396242e2a22d0c3f8248dc08451afc7cab.tar.gz coinos-ui-92ff34396242e2a22d0c3f8248dc08451afc7cab.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 3548ccd4..d8557a01 100644 --- a/src/routes/(app)/[username]/generate/+page.svelte +++ b/src/routes/(app)/[username]/generate/+page.svelte @@ -13,6 +13,11 @@ let loaded; let gen = async () => { if (!browser) return; + if (user.pubkey) { + goto($loginRedirect || `/${user.username}`, { invalidateAll: true }); + return; + } + setTimeout(() => (loaded = true), 50); if (!$password) $passwordPrompt = true; |
