fix: both logout buttons now use inline onclick — no JS handlers
- Header #logout-btn: inline fetch+clear localStorage+redirect - Settings #profile-logout: inline window.handleLogout or fetch fallback - Removed all JS event listeners that were causing race conditions - Zero dependency on ES module loading order
This commit is contained in:
@@ -661,6 +661,7 @@
|
||||
id="logout-btn"
|
||||
type="button"
|
||||
role="menuitem"
|
||||
onclick="fetch('/api/auth/logout',{method:'POST',credentials:'include'}).then(function(){localStorage.clear();window.location.href='/'}).catch(function(){localStorage.clear();window.location.href='/'})"
|
||||
>
|
||||
<span
|
||||
class="menu-list-icon"
|
||||
|
||||
Reference in New Issue
Block a user