Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions frontend/src/hooks/useTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
currentPage: data.currentPage || pageToFetch,
limit: data.limit || initialLimit,
});
} catch (error) {

Check failure on line 54 in frontend/src/hooks/useTasks.js

View workflow job for this annotation

GitHub Actions / frontend

'error' is defined but never used
console.log(error?.response?.data?.message || "Failed to load tasks");

setTasks([]);
} finally {
setLoading(false);
Expand All @@ -64,9 +64,9 @@
// create new task
const addTask = async (taskData) => {
try {
const response = await api.post("/tasks", taskData);

Check failure on line 67 in frontend/src/hooks/useTasks.js

View workflow job for this annotation

GitHub Actions / frontend

'response' is assigned a value but never used. Allowed unused vars must match /^[A-Z_]/u

console.log("Task added:", response.data);


invalidateTasks();

Expand All @@ -76,12 +76,7 @@
setPage(DEFAULT_PAGE);
}
} catch (error) {
console.log("FULL ERROR:", error);
console.log(
error?.response?.data?.message ||
error?.response?.data ||
error.message,
);

alert(error?.response?.data?.message || "Failed to create task");
throw error;
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const Login = () => {
setUser(res.data.user);
navigate(redirectPath, { replace: true });
} catch (err) {
console.error(err);
console.error("Google login failed", err);


setError(
err.response?.data?.message ||
Expand Down
Loading