async function displayAccountActivity() {
if (!window.lantern || !window.lantern.api) {
console.error('Lantern API is not available.');
return;
}
try {
const activity = await window.lantern.api.getAccountActivity();
console.log('Account Activity:', activity);
// Render the activity data in your theme...
} catch (error) {
console.error('Failed to fetch account activity:', error);
}
}
// Ensure Lantern is loaded before calling the function
window.addEventListener('lantern:loaded', displayAccountActivity);