From 22a34506c9bf005aceb2e18619decba589bd9d64 Mon Sep 17 00:00:00 2001 From: 230419 <230419@epvc.pt> Date: Tue, 10 Mar 2026 17:12:18 +0000 Subject: [PATCH] feat: Remove anonymous guest login functionality and associated UI elements. --- .env | 3 +-- src/App.jsx | 27 ++++++++------------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.env b/.env index cd283b8..b3526e0 100644 --- a/.env +++ b/.env @@ -7,5 +7,4 @@ VITE_FIREBASE_APP_ID="1:219982610263:web:0ebe67d9cf0e7d2753c812" VITE_APP_ID=my-closet-app VITE_INITIAL_AUTH_TOKEN= -#fiz um teste -#fiz outro teste + diff --git a/src/App.jsx b/src/App.jsx index df0e0c4..aa7ac5e 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -11,7 +11,7 @@ import { import { signInWithEmailAndPassword, createUserWithEmailAndPassword, - onAuthStateChanged, signOut, signInAnonymously, signInWithCustomToken + onAuthStateChanged, signOut, signInWithCustomToken } from 'firebase/auth'; import { collection, doc, onSnapshot, addDoc, updateDoc, @@ -179,23 +179,14 @@ export default function App() { } catch (err) { console.error(err); if (err.code === 'auth/operation-not-allowed') { - setAuthError('O login por e-mail está desativado. Use o modo Convidado.'); + setAuthError('O login por e-mail está desativado.'); } else { setAuthError(err.message); } } finally { setLoading(false); } }; - const handleGuestLogin = async () => { - setLoading(true); - try { - await signInAnonymously(auth); - } catch (e) { - setAuthError('Erro no modo convidado: ' + e.message); - } finally { - setLoading(false); - } - }; + const emptyTrashPermanently = async () => { if (!user || !window.confirm("Esvaziar o lixo permanentemente?")) return; @@ -249,9 +240,7 @@ export default function App() { - +