diff options
| author | Adam Soltys <[email protected]> | 2024-12-29 18:19:47 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-29 18:19:47 -0800 |
| commit | 423aae598f314fe6303aea54570e032535b82768 (patch) | |
| tree | cd6a790009dd22183e7921b579139d490835a4ae /src/routes/(app) | |
| parent | b24faa6810de900faafd35a89a90d2b6e0b0c58b (diff) | |
| parent | 6b66e1a4b0672e8021b018694ad10bf5ebcde4f7 (diff) | |
| download | coinos-ui-423aae598f314fe6303aea54570e032535b82768.tar.gz coinos-ui-423aae598f314fe6303aea54570e032535b82768.zip | |
Merge branch 'nostr-login'
Diffstat (limited to 'src/routes/(app)')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+page.svelte | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index 05273bc5..53a994ad 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -1,4 +1,6 @@ <script> + import { browser } from "$app/environment"; + import { onMount } from "svelte"; import { scale } from "svelte/transition"; import { btc, f, sat } from "$lib/utils"; import Account from "$comp/Account.svelte"; @@ -23,6 +25,13 @@ }; if (user) user.savings = 0; + + let pk = $state();; + onMount(async () => { + if (browser) { + pk = await window.nostr.getPublicKey(); + } + }); </script> <div class="space-y-2"> |
