had the profile update method commented out LOL

This commit is contained in:
miggymofongo 2024-12-05 22:15:04 -04:00
parent dcea70fc17
commit 4563149393
2 changed files with 5 additions and 6 deletions

View file

@ -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 = '';

View file

@ -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 '';
}