forked from coracle/flotilla
Wait for auth before requesting stuff
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user