Skip to content

Commit

Permalink
fix active logic
Browse files Browse the repository at this point in the history
  • Loading branch information
judithmarg committed Apr 21, 2024
1 parent 97540a8 commit 7d175f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/screens/ActivationScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ActivationScreen = () => {
activo: used,
empresa: doc.data().empresa_id //nombre directamente
}
if (!codes.includes(codigo) && !used) {
if (!codes.includes(codigo) && used) {
newCodes.push(codigoConId);
}
});
Expand All @@ -59,7 +59,7 @@ const ActivationScreen = () => {
}
const docRef = doc(db, 'codigoActivacion', codeDocum.id);
try {
await updateDoc(docRef, { activo: true });
await updateDoc(docRef, { activo: false });
setMessage(false);
setEmpresa(codeDocum.empresa);
navigation.replace("LoginScreen");
Expand Down

0 comments on commit 7d175f7

Please sign in to comment.