login stuff and user profile

This commit is contained in:
2024-06-28 06:16:32 -04:00
parent 9cd73c12db
commit 4b8fc1abdb
7 changed files with 62 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
<script lang="ts">
import { page } from "$app/stores";
import { ndk } from "$lib/stores/nostr";
import type NDK from "@nostr-dev-kit/ndk";
import { onMount } from "svelte";
import { get } from "svelte/store";
let id: string;
let { user } = $page.data;
let _ndk: NDK;
onMount(() => {
_ndk = get(ndk);
})
$: if (id !== $page.params.id){
id = $page.params.id;
user.ndk = _ndk;
}
</script>