From 37381463dd8b2a69db55032971c48170a94c0101 Mon Sep 17 00:00:00 2001 From: tmdeveloper007 Date: Sat, 25 Jul 2026 10:59:33 +0000 Subject: [PATCH] chore: remove debug console.log and alert statements from useTasks hook --- frontend/src/hooks/useTasks.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/frontend/src/hooks/useTasks.js b/frontend/src/hooks/useTasks.js index 4cd7d700..7f9bf86f 100644 --- a/frontend/src/hooks/useTasks.js +++ b/frontend/src/hooks/useTasks.js @@ -52,7 +52,6 @@ const useTasks = ({ limit: data.limit || initialLimit, }); } catch (error) { - console.log(error?.response?.data?.message || "Failed to load tasks"); setTasks([]); } finally { setLoading(false); @@ -64,9 +63,7 @@ const useTasks = ({ // create new task const addTask = async (taskData) => { try { - const response = await api.post("/tasks", taskData); - - console.log("Task added:", response.data); + await api.post("/tasks", taskData); invalidateTasks(); @@ -76,13 +73,6 @@ const useTasks = ({ 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; } }; @@ -114,7 +104,6 @@ const useTasks = ({ invalidateTasks(); await getTasks(page); } catch (error) { - console.log(error?.response?.data?.message || "Failed to update task"); invalidateTasks(); await getTasks(page); }