diff --git a/client/build/index.html b/client/build/index.html
index 4e5f270..33851ae 100644
--- a/client/build/index.html
+++ b/client/build/index.html
@@ -23,7 +23,7 @@
padding: 20px;
}
-
+
diff --git a/client/src/App.tsx b/client/src/App.tsx
index 7b0e4f9..08d602a 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -12,6 +12,13 @@ const App: React.FC = () => {
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
+ useEffect(() => {
+ if (error) {
+ const timer = setTimeout(() => setError(null), 5000);
+ return () => clearTimeout(timer);
+ }
+ }, [error]);
+
useEffect(() => {
loadTasks();
}, []);
diff --git a/client/src/components/TaskCard.tsx b/client/src/components/TaskCard.tsx
index 8f82f31..c258550 100644
--- a/client/src/components/TaskCard.tsx
+++ b/client/src/components/TaskCard.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useState, useEffect } from 'react';
import { FocusTask } from '../types';
import './TaskCard.css';
@@ -13,6 +13,11 @@ const TaskCard: React.FC = ({ task, onUpdate, onDelete }) => {
const [editTitle, setEditTitle] = useState(task.title);
const [editDescription, setEditDescription] = useState(task.description || '');
+ useEffect(() => {
+ setEditTitle(task.title);
+ setEditDescription(task.description || '');
+ }, [task.id, task.title, task.description]);
+
const handleSave = () => {
if (editTitle.trim()) {
onUpdate(editTitle, editDescription);
diff --git a/client/src/vite-env.d.ts b/client/src/vite-env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/client/src/vite-env.d.ts
@@ -0,0 +1 @@
+///