diff --git a/src/main.js b/src/main.js index a869b0c..c8bffc0 100755 --- a/src/main.js +++ b/src/main.js @@ -20,8 +20,9 @@ async function render() { return; } + // Güvenli Avatar URL const avatarUrl = user?.avatar - ? `https://pocketbase.iontalp.com/api/files/_pb_users_auth_/${user.id}/${user.avatar}?thumb=100x100` + ? `https://pocketbase.iontalp.com/api/files/${user.collectionId || "_pb_users_auth_"}/${user.id}/${user.avatar}?thumb=100x100` : null; let currentBg = @@ -54,17 +55,17 @@ async function render() { selectedCity = city; localStorage.setItem("selected_city", city); render(); - } + }, ); } else if (activeTab === "kaza") { - currentPage = renderKaza(pb); + currentPage = await renderKaza(pb); } else { - currentPage = renderDesktop(selectedCity, pb); + currentPage = await renderDesktop(selectedCity, pb); } app.innerHTML = `