diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index 05807c3..cac0277 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -6,8 +6,8 @@ export const Checkbox = ({ id, taskDesc }) => { const archiveTask = () => { updateTaskData(id, { archived: true, - }).then(docRef => { - console.log("Task updated successfully , task id:", docRef.id) + }).then(() => { + console.log("Task updated successfully , task id:", id) }).catch(e => console.log("Failed to update the task", e)); }; diff --git a/src/components/IndividualProject.js b/src/components/IndividualProject.js index fa8e83b..8a346c8 100644 --- a/src/components/IndividualProject.js +++ b/src/components/IndividualProject.js @@ -49,6 +49,7 @@ export const IndividualProject = ({ project }) => { @@ -60,6 +61,7 @@ export const IndividualProject = ({ project }) => { tabIndex={0} role="button" aria-label="Cancel adding project, do not delete" + data-testid="cancel" > Cancel diff --git a/src/helpers/firestore-api.js b/src/helpers/firestore-api.js index e287d06..0610202 100644 --- a/src/helpers/firestore-api.js +++ b/src/helpers/firestore-api.js @@ -25,7 +25,7 @@ export const addTaskOnFB = async (payload) => { } export const updateTaskData = async (id, newData) => { - return await updateDoc(collection(db, "tasks", id), newData) + return await updateDoc(doc(db, "tasks", id), newData) } export const deleteProjectFromFB = async (id) => { diff --git a/src/pages/Dashboard.js b/src/pages/Dashboard.js index 61f92a6..d8c6539 100644 --- a/src/pages/Dashboard.js +++ b/src/pages/Dashboard.js @@ -28,22 +28,27 @@ export default function Dashboard() { >
- -

Profile

- {error && {error}} - Email: {currentUser.email} - + +

Profile

+ {error && {error}} + Email: {currentUser.email} + Go Home Update Profile
-
+
diff --git a/src/pages/ForgotPassword.js b/src/pages/ForgotPassword.js index fd745dc..78f11ea 100644 --- a/src/pages/ForgotPassword.js +++ b/src/pages/ForgotPassword.js @@ -33,25 +33,25 @@ export default function ForgotPassword() { style={{ minHeight: "100vh" }}>
- -

Password Reset

- {error && {error}} - {message && {message}} -
- - Email - + +

Password Reset

+ {error && {error}} + {message && {message}} + + + Email + - -
+
Login
-
+
Need an account? Sign Up
diff --git a/src/pages/Login.js b/src/pages/Login.js index 73fd167..91d0ba0 100644 --- a/src/pages/Login.js +++ b/src/pages/Login.js @@ -35,28 +35,28 @@ export default function Login() { style={{ minHeight: "100vh" }}>
- -

Log In

- {error && {error}} -
- - Email - + +

Log In

+ {error && {error}} + + + Email + - - Password - + + Password + - -
+
Forgot Password?
-
+
Need an account? Sign Up
diff --git a/src/pages/NotFound.js b/src/pages/NotFound.js index 341e92d..0da235a 100644 --- a/src/pages/NotFound.js +++ b/src/pages/NotFound.js @@ -13,9 +13,9 @@ export default function NotFound() { style={{ minHeight: "100vh" }}>
- -

Page Not Found

- + +

Page Not Found

+ Go Back To Home
diff --git a/src/pages/Signup.js b/src/pages/Signup.js index d8e0e51..853e24d 100644 --- a/src/pages/Signup.js +++ b/src/pages/Signup.js @@ -42,29 +42,29 @@ export default function Signup() { style={{ minHeight: "100vh" }}>
- -

Sign Up

- {error && {error}} -
- - Email - + +

Sign Up

+ {error && {error}} + + + Email + - - Password - + + Password + - - Password Confirmation - + + Password Confirmation + -
-
+
Already have an account? Log In
diff --git a/src/pages/UpdateProfile.js b/src/pages/UpdateProfile.js index 58856da..2ce6b86 100644 --- a/src/pages/UpdateProfile.js +++ b/src/pages/UpdateProfile.js @@ -49,42 +49,45 @@ export default function UpdateProfile() { style={{ minHeight: "100vh" }}>
- -

Update Profile

- {error && {error}} -
- - Email + +

Update Profile

+ {error && {error}} + + + Email - - Password + + Password - - Password Confirmation + + Password Confirmation -
-
+
Cancel