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() { - +