im trying to redirect the page after the user is logged in but I cant
i want to redirect it to another page components inside the project so window solution wont work for me
here is my code:
function toggleSignIn(e) {
    e.preventDefault();
    signInWithEmailAndPassword(auth, email, password)
      .then((response) => {
        console.log(response);
      })
      .catch(function(error) {
        var errorCode = error.code;
        var errorMessage = error.message;
        if (errorCode === "auth/wrong-password") {
          alert("Wrong password.");
        } else {
          alert(errorMessage);
        }
        console.log(error);
      });
  }
  <button
                  to="CardsTabs"
                  type="submit"
                  onClick={toggleSignIn}
                >
                  Giriş Yap
                </button>
noting that i cant use Link becasue it wont be working the firebase auth.
how can i achieve it?
i have tried multpile solutions but them seem old
 
    