diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx index 1b53a29a..16a78ea9 100644 --- a/client/contexts/AuthContext.tsx +++ b/client/contexts/AuthContext.tsx @@ -831,27 +831,30 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ clearClientAuthState(); // Fire and forget global sign-out - don't wait for it, don't block UI - supabase.auth.signOut({ scope: "global" }).catch((error) => { - console.warn("Global sign-out error:", error); - // Still try to show a toast even if global fails - try { - aethexToast.info({ - title: "Signed out", - description: "You have been signed out successfully (local only).", - }); - } catch (e) { - /* ignore */ - } - }).then(() => { - try { - aethexToast.info({ - title: "Signed out", - description: "You have been signed out successfully.", - }); - } catch (e) { - /* ignore */ - } - }); + supabase.auth + .signOut({ scope: "global" }) + .catch((error) => { + console.warn("Global sign-out error:", error); + // Still try to show a toast even if global fails + try { + aethexToast.info({ + title: "Signed out", + description: "You have been signed out successfully (local only).", + }); + } catch (e) { + /* ignore */ + } + }) + .then(() => { + try { + aethexToast.info({ + title: "Signed out", + description: "You have been signed out successfully.", + }); + } catch (e) { + /* ignore */ + } + }); }; const updateProfile = async (updates: Partial) => { diff --git a/index.html b/index.html index 4f83eaa9..19cc2b0e 100644 --- a/index.html +++ b/index.html @@ -189,18 +189,23 @@ window.discordSdkReady = false; // Only attempt to load Discord SDK if we're in the Discord Activity route - window.loadDiscordSDK = async function() { + window.loadDiscordSDK = async function () { if (window.discordSdkReady) return; try { - const { DiscordSDK } = await import('https://cdn.discordapp.com/assets/embedded/lazyload.min.js'); + const { DiscordSDK } = await import( + "https://cdn.discordapp.com/assets/embedded/lazyload.min.js" + ); if (DiscordSDK) { window.DiscordSDK = new DiscordSDK({ - clientId: '578971245454950421', + clientId: "578971245454950421", }); window.discordSdkReady = true; } } catch (e) { - console.warn('Discord SDK loading skipped (not in Activity context):', e.message); + console.warn( + "Discord SDK loading skipped (not in Activity context):", + e.message, + ); } };