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
1 change: 0 additions & 1 deletion backend/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/components/Task/TaskItem.jsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -104,7 +104,7 @@ export default function TaskItem({

{task.dependsOn && (
<div className="text-[11px] text-muted flex items-center gap-1 mt-1 bg-white/40 dark:bg-slate-800/40 px-2 py-1 rounded border border-soft/30">
<span className="shrink-0 text-amber-500">🔗</span>
<span className="shrink-0 text-amber-500"><Link2 size={12} /></span>
<span className="truncate" title={task.dependsOn.title}>
Depends on: {task.dependsOn.title}
</span>
Expand Down Expand Up @@ -225,8 +225,9 @@ export default function TaskItem({
</div>

{task.dependsOn && (
<p className="text-xs text-muted mt-1">
🔗 Depends on: {task.dependsOn.title}
<p className="text-xs text-muted mt-1 flex items-center gap-1">
<Link2 size={11} className="shrink-0 text-amber-500" />
Depends on: {task.dependsOn.title}
</p>
)}

Expand Down
16 changes: 3 additions & 13 deletions frontend/src/hooks/useTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();

Expand All @@ -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;
}
Expand Down Expand Up @@ -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);
}
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/pages/LandingPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Link } from "react-router-dom";
import { Clipboard, CalendarDays, BarChart2 } from "lucide-react";

const LandingPage = () => {
return (
Expand Down Expand Up @@ -66,8 +67,8 @@ const LandingPage = () => {
shadow-lg hover:shadow-2xl
"
>
<div className="w-14 h-14 rounded-2xl bg-[#d0f6e3] flex items-center justify-center text-2xl mb-6 group-hover:scale-110 transition">
📋
<div className="w-14 h-14 rounded-2xl bg-[#d0f6e3] flex items-center justify-center mb-6 group-hover:scale-110 transition">
<Clipboard size={24} className="text-[#4eb7b3]" />
</div>

<h3 className="text-xl font-bold text-slate-800 dark:text-white mb-3">
Expand Down Expand Up @@ -95,8 +96,8 @@ const LandingPage = () => {
shadow-lg hover:shadow-2xl
"
>
<div className="w-14 h-14 rounded-2xl bg-[#d0f6e3] flex items-center justify-center text-2xl mb-6 group-hover:scale-110 transition">
🗓️
<div className="w-14 h-14 rounded-2xl bg-[#d0f6e3] flex items-center justify-center mb-6 group-hover:scale-110 transition">
<CalendarDays size={24} className="text-[#4eb7b3]" />
</div>

<h3 className="text-xl font-bold text-slate-800 dark:text-white mb-3">
Expand Down Expand Up @@ -124,8 +125,8 @@ const LandingPage = () => {
shadow-lg hover:shadow-2xl
"
>
<div className="w-14 h-14 rounded-2xl bg-[#d0f6e3] flex items-center justify-center text-2xl mb-6 group-hover:scale-110 transition">
📊
<div className="w-14 h-14 rounded-2xl bg-[#d0f6e3] flex items-center justify-center mb-6 group-hover:scale-110 transition">
<BarChart2 size={24} className="text-[#4eb7b3]" />
</div>

<h3 className="text-xl font-bold text-slate-800 dark:text-white mb-3">
Expand Down