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: String }) profilePic = '';
@property({ type: Boolean }) isSignedIn = false; @property({ type: Boolean }) isSignedIn = false;
@property({ type: String }) publicKey = ''; @property({ type: String }) publicKey = '';
@property({ type: String }) updateProfileFromEvent = ''
static styles = [ static styles = [
@ -122,8 +121,8 @@ Profile Picture Container
const storedPubkey = localStorage.getItem('pubkey'); const storedPubkey = localStorage.getItem('pubkey');
if (storedPubkey) { if (storedPubkey) {
// Manually fetch profile metadata on mount // Manually fetch profile metadata on mount
this.nostrAddy = 'Fetching...'; this.nostrAddy = 'loading...';
this.bio = 'Fetching profile...'; this.bio = 'loading profile...';
this.profilePic = '/assets/img/default_pfp.png'; this.profilePic = '/assets/img/default_pfp.png';
} }
} }
@ -135,7 +134,7 @@ Profile Picture Container
window.removeEventListener('user-signed-out', this.handlesSignOut.bind(this)); 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); console.log('Profile updated event received:', (event as CustomEvent).detail);
const detail = (event as CustomEvent).detail; const detail = (event as CustomEvent).detail;
@ -144,7 +143,7 @@ Profile Picture Container
this.profilePic = detail.profilePic; this.profilePic = detail.profilePic;
this.isSignedIn = true; this.isSignedIn = true;
this.requestUpdate(); this.requestUpdate();
} */ }
handlesSignOut() { handlesSignOut() {
this.profilePic = ''; this.profilePic = '';

View file

@ -170,7 +170,7 @@ async translateText(text: string, targetLang: string) {
text, target_lang: targetLang }); text, target_lang: targetLang });
return response.data.translations[0].text; // Assuming DeepL's API structure 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); console.error('Error during translation:', error.response?.data || error.message);
return ''; return '';
} }