Wait for auth before requesting stuff

This commit is contained in:
Jon Staab
2024-08-19 10:26:25 -07:00
parent cf41ea58fd
commit 4d7c880576
4 changed files with 25 additions and 14 deletions
+10 -8
View File
@@ -41,14 +41,6 @@
}
onMount(() => {
for (const url of DEFAULT_RELAYS) {
loadRelay(url)
}
if ($pk) {
loadUserData($pk)
}
ready = initStorage({
events: {
keyPath: "id",
@@ -69,6 +61,16 @@
clearModal()
}
})
ready.then(() => {
for (const url of DEFAULT_RELAYS) {
loadRelay(url)
}
if ($pk) {
loadUserData($pk)
}
})
})
</script>