fix(task): replace Date.now with nanoid for unique keys and update task interface

This commit is contained in:
2026-04-27 14:50:06 +02:00
parent ef06f22edc
commit 0e3a70a454
6 changed files with 19 additions and 14 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ function App() {
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
/>
<button onClick={() => addTask(inputValue)}>Add</button>
<button onClick={() => { addTask(inputValue); setInputValue(''); }}>Add</button>
</div>
<div className="task-list">
{tasks.length === 0 ? (