diff --git a/backend/src/server.js b/backend/src/server.js index 4ad5fc5a..70a670f7 100644 --- a/backend/src/server.js +++ b/backend/src/server.js @@ -36,7 +36,6 @@ const allowedOrigins = [ process.env.FRONTEND_URL, "http://localhost:5173", "http://127.0.0.1:5173", - "https://dailyforge-frontend-lhjq.onrender.com", ].filter(Boolean); app.use( diff --git a/frontend/src/components/ErrorBoundary.jsx b/frontend/src/components/ErrorBoundary.jsx index cdbeb512..320b0f37 100644 --- a/frontend/src/components/ErrorBoundary.jsx +++ b/frontend/src/components/ErrorBoundary.jsx @@ -31,8 +31,8 @@ class ErrorBoundary extends React.Component { render() { if (this.state.hasError) { return ( -
-
+
+
@@ -40,13 +40,13 @@ class ErrorBoundary extends React.Component {
-

Oops! Something went wrong

-

+

Oops! Something went wrong

+

We're sorry, but an unexpected error occurred. The application has recovered from a crash, but you might need to refresh or return to the dashboard.

{this.state.error && ( -
-

+

+

{this.state.error.toString()}

@@ -60,7 +60,7 @@ class ErrorBoundary extends React.Component { diff --git a/frontend/src/components/Task/TaskItem.jsx b/frontend/src/components/Task/TaskItem.jsx index 40758aa9..b2ab4288 100644 --- a/frontend/src/components/Task/TaskItem.jsx +++ b/frontend/src/components/Task/TaskItem.jsx @@ -1,4 +1,4 @@ -import { Check, Trash2, Pencil, Calendar, Play } from "lucide-react"; +import { Check, Trash2, Pencil, Calendar, Play, Link2 } from "lucide-react"; import { useState } from "react"; import TaskFormModal from "./TaskFormModal"; import { getCategoryColor } from "../../utils/categoryUtils"; @@ -104,7 +104,7 @@ export default function TaskItem({ {task.dependsOn && (
- 🔗 + Depends on: {task.dependsOn.title} @@ -225,8 +225,9 @@ export default function TaskItem({
{task.dependsOn && ( -

- 🔗 Depends on: {task.dependsOn.title} +

+ + Depends on: {task.dependsOn.title}

)} diff --git a/frontend/src/hooks/useTasks.js b/frontend/src/hooks/useTasks.js index 4cd7d700..47baf0a4 100644 --- a/frontend/src/hooks/useTasks.js +++ b/frontend/src/hooks/useTasks.js @@ -51,8 +51,7 @@ const useTasks = ({ currentPage: data.currentPage || pageToFetch, limit: data.limit || initialLimit, }); - } catch (error) { - console.log(error?.response?.data?.message || "Failed to load tasks"); + } catch { 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,12 +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; } @@ -113,8 +104,7 @@ const useTasks = ({ await api.put(`/tasks/${id}`, updates); invalidateTasks(); await getTasks(page); - } catch (error) { - console.log(error?.response?.data?.message || "Failed to update task"); + } catch { invalidateTasks(); await getTasks(page); } diff --git a/frontend/src/pages/LandingPage.jsx b/frontend/src/pages/LandingPage.jsx index 4fe26731..1d5bc326 100644 --- a/frontend/src/pages/LandingPage.jsx +++ b/frontend/src/pages/LandingPage.jsx @@ -1,4 +1,5 @@ import { Link } from "react-router-dom"; +import { Clipboard, CalendarDays, BarChart2 } from "lucide-react"; const LandingPage = () => { return ( @@ -66,8 +67,8 @@ const LandingPage = () => { shadow-lg hover:shadow-2xl " > -
- 📋 +
+

@@ -95,8 +96,8 @@ const LandingPage = () => { shadow-lg hover:shadow-2xl " > -
- 🗓️ +
+

@@ -124,8 +125,8 @@ const LandingPage = () => { shadow-lg hover:shadow-2xl " > -
- 📊 +
+