Skip to content

Commit

Permalink
components fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
scobru committed Oct 14, 2024
1 parent c0ac2c2 commit eba40f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
console.log("Pulse updated:", $globalAccount.pulse);
}
onMount(() => {
$effect(() => {
if(user?.pub){
console.log("AccountProfile mounted", $globalAccount);
let { account } = useAccount(pub || user?.pub);
$globalAccount = account;
}
});
const fields = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
let newFieldName = '';
let newFieldValue = '';
onMount(() => {
loadUserProfile();
onMount(async () => {
// Carica immediatamente il profilo
profile = await loadUserProfile();
// Sottoscrivi agli aggiornamenti
return user.subscribe(u => {
if (u.profile) {
profile = { ...u.profile };
Expand Down Expand Up @@ -91,4 +94,4 @@

<style>
/* Puoi aggiungere stili personalizzati qui se necessario */
</style>
</style>

0 comments on commit eba40f9

Please sign in to comment.