From 45631493930b5074c934c7a8f03c75d719a8cf3a Mon Sep 17 00:00:00 2001 From: miggymofongo Date: Thu, 5 Dec 2024 22:15:04 -0400 Subject: [PATCH] had the profile update method commented out LOL --- src/pages/app-home.ts | 9 ++++----- src/pages/note-wall.ts | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/pages/app-home.ts b/src/pages/app-home.ts index 70e9932..f083629 100644 --- a/src/pages/app-home.ts +++ b/src/pages/app-home.ts @@ -26,7 +26,6 @@ export class AppHome extends LitElement { @property({ type: String }) profilePic = ''; @property({ type: Boolean }) isSignedIn = false; @property({ type: String }) publicKey = ''; - @property({ type: String }) updateProfileFromEvent = '' static styles = [ @@ -122,8 +121,8 @@ Profile Picture Container const storedPubkey = localStorage.getItem('pubkey'); if (storedPubkey) { // Manually fetch profile metadata on mount - this.nostrAddy = 'Fetching...'; - this.bio = 'Fetching profile...'; + this.nostrAddy = 'loading...'; + this.bio = 'loading profile...'; this.profilePic = '/assets/img/default_pfp.png'; } } @@ -135,7 +134,7 @@ Profile Picture Container window.removeEventListener('user-signed-out', this.handlesSignOut.bind(this)); } - /* updateProfileFromEvent(event: Event) { + updateProfileFromEvent(event: Event) { console.log('Profile updated event received:', (event as CustomEvent).detail); const detail = (event as CustomEvent).detail; @@ -144,7 +143,7 @@ Profile Picture Container this.profilePic = detail.profilePic; this.isSignedIn = true; this.requestUpdate(); - } */ + } handlesSignOut() { this.profilePic = ''; diff --git a/src/pages/note-wall.ts b/src/pages/note-wall.ts index b126484..d4af7d5 100644 --- a/src/pages/note-wall.ts +++ b/src/pages/note-wall.ts @@ -170,7 +170,7 @@ async translateText(text: string, targetLang: string) { text, target_lang: targetLang }); return response.data.translations[0].text; // Assuming DeepL's API structure - } catch (error) { + } catch (error: any) { console.error('Error during translation:', error.response?.data || error.message); return ''; }