aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-29 11:59:02 -0800
committerAdam Soltys <[email protected]>2024-12-29 18:19:39 -0800
commit6b66e1a4b0672e8021b018694ad10bf5ebcde4f7 (patch)
treeea597e5d9d13b6a6b457eedcdad69cf8387efc0b /src/routes/(app)
parente92774e03839ef62814349e9b9bb6a7740e0d7f0 (diff)
downloadcoinos-ui-6b66e1a4b0672e8021b018694ad10bf5ebcde4f7.tar.gz
coinos-ui-6b66e1a4b0672e8021b018694ad10bf5ebcde4f7.zip
nostr login
Diffstat (limited to 'src/routes/(app)')
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte9
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">