dashboard.component.ts :
ngOnInit() {
const userId = this.authService.getUserId();
if (userId) {
this.loadProfileImage(userId);
} else {
console.error('User ID is null. Cannot load profile image.');
}
}
auth.service.ts :
getUserId(): string | null {
const user = this.firebaseAuth.currentUser;
return user ? user.uid : null;
}
terminal errors/messages :
User ID is null. Cannot load profile image.
localStorage is not available
Every time I run "ng serve", these terminal errors/messages pop up. I suspect they are causing issues with updating users' profile pictures, particularly in the getUserId method of the authservice.