Fix #join scroll on mobile — await dynamic content before scrolling to hash

This commit is contained in:
King Omar 2026-07-12 16:14:50 +10:00
parent 046937dc37
commit ad058c1978

View file

@ -770,10 +770,11 @@ function getMediaURL(path) {
await loadUserData();
loadVerifiedUsers();
setupEventListeners();
fetchProposals();
fetchLeaderboard();
fetchStats();
await Promise.allSettled([fetchProposals(), fetchLeaderboard(), fetchStats()]);
checkForProposalInUrl();
if (window.location.hash === '#join') {
document.getElementById('join')?.scrollIntoView({ behavior: 'smooth' });
}
}
// Update UI text for petition system