···146146 setAgent(agentInstance);
147147148148 // Fetch logged-in user's profile info using the authenticated API
149149- // Use the agent's built-in DID reference after initialization
150150- agentInstance.getProfile({ actor: agentInstance.session.did })
149149+ // Use the DID directly from the session object from useAuth()
150150+ agentInstance.getProfile({ actor: session.did })
151151 .then(res => {
152152 console.log('Logged-in user profile fetched successfully:', res.data);
153153 setUserInfo(res.data);