Drag and drop

This commit is contained in:
2025-10-16 17:40:33 +02:00
parent b02c9c5c41
commit f298eb4573
5 changed files with 305 additions and 17 deletions

View File

@@ -20,6 +20,7 @@ export const saveHabit = (habit) => {
const newHabit = {
...habit,
id: Date.now().toString(),
sortOrder: habits.length,
};
habits.push(newHabit);
localStorage.setItem(STORAGE_KEY, JSON.stringify(habits));