Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Security2431/2day-report
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d21fe9f12763e973129008084bb44d3fdc83f057
Choose a base ref
..
head repository: Security2431/2day-report
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6adababfd9fbb6e0c5289d6d2b69e2eecb6de170
Choose a head ref
Showing with 7 additions and 14 deletions.
  1. +7 −14 apps/nextjs/src/app/_components/credential-auth.tsx
21 changes: 7 additions & 14 deletions apps/nextjs/src/app/_components/credential-auth.tsx
Original file line number Diff line number Diff line change
@@ -37,21 +37,14 @@ const CredentialAuth = () => {
redirect: false,
});

console.log("response", response);

if (response?.ok) {
console.log("success");
router.push("/");
return;
console.log({ response });
if (!response?.error) {
router.push("/workspaces");
router.refresh();
}

// Toast failed
toast.error("Failed! Check you input and try again.");
// return;
console.error("Failed", response);
} catch (e) {
console.error(e);
// toast.error(e);
} catch (error) {
console.error(error);
toast.error("Invalid email or password");
}
};