added dashboard with add delete and recently view the projects

This commit is contained in:
2025-05-19 14:50:33 +05:30
parent eebc91831d
commit 0ecb85a211
33 changed files with 1467 additions and 288 deletions

View File

@@ -26,19 +26,23 @@ const UserAuth: React.FC = () => {
e.preventDefault();
const organization = email.split("@")[1].split(".")[0];
console.log('email, password, organization: ', email, password, organization);
try {
const res = await signInApi(email, password, organization);
if (res.message === "login successfull") {
setError("");
setOrganization(organization);
setUserName(res.name);
console.log(' res.userId: ', res.userId);
localStorage.setItem("userId", res.userId);
localStorage.setItem("email", res.email);
localStorage.setItem("userName", res.name);
if (res.isShare) {
setLoadingProgress(1);
navigate("/Project");
// navigate("/Project");
navigate("/Dashboard");
}
} else if (res.message === "User Not Found!!! Kindly signup...") {
setError("Account not found");