Well, sending messages took longer than it should have
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
class ProfileMenu extends Shadow {
|
||||
profile;
|
||||
|
||||
render() {
|
||||
ZStack(() => {
|
||||
@@ -9,7 +8,7 @@ class ProfileMenu extends Shadow {
|
||||
p("Email: ")
|
||||
.fontWeight("bold")
|
||||
|
||||
p(this.profile?.email)
|
||||
p(window.profile?.email)
|
||||
})
|
||||
.gap(1, em)
|
||||
|
||||
@@ -17,7 +16,7 @@ class ProfileMenu extends Shadow {
|
||||
p("Name: ")
|
||||
.fontWeight("bold")
|
||||
|
||||
p(this.profile?.name)
|
||||
p(window.profile?.name)
|
||||
})
|
||||
.gap(1, em)
|
||||
|
||||
@@ -38,8 +37,8 @@ class ProfileMenu extends Shadow {
|
||||
.center()
|
||||
.display("none")
|
||||
.onAppear(async () => {
|
||||
if(!this.profile) {
|
||||
this.profile = await this.fetchProfile()
|
||||
if(!window.profile) {
|
||||
window.profile = await this.fetchProfile()
|
||||
this.rerender()
|
||||
}
|
||||
})
|
||||
@@ -60,7 +59,6 @@ class ProfileMenu extends Shadow {
|
||||
const profile = await res.json();
|
||||
console.log(profile);
|
||||
return profile
|
||||
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user