added dashboard with add delete and recently view the projects
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user