-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate initial state & add initial tasks
- Loading branch information
Showing
4 changed files
with
50 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const initialTasks = [ | ||
"✔️ Mark me completed.", | ||
"✏️ Edit to corrrect me.", | ||
"🗑️ Delete me.", | ||
"⚙️ Click the gear (top-right) to access settings.", | ||
"🟠 Change the current theme.", | ||
"🔄 Sync with your Google Tasks account.", | ||
"✅ View completed todos.", | ||
"🆘 In-case of emergency \"Reset & Clear cache\" is your friend.", | ||
"🔽 Sort the todos to \"Oldest First\".", | ||
"📗 Click \"TodoList ↕️\" (top-left) to access other projects / tasklists.", | ||
] | ||
|
||
const initialState = { | ||
todos: { | ||
0: { | ||
...initialTasks.map((task, i) => ({ | ||
task, | ||
id: i, | ||
timestamp: initialTasks.length-i, | ||
completed: false, | ||
})) | ||
}, | ||
}, | ||
projects: { | ||
0: { | ||
id: 0, | ||
synced: false, | ||
timestamp: Date.now(), | ||
title: "TodoList", | ||
} | ||
}, | ||
settings: { | ||
currentTheme: "randomImage", | ||
sortType: "newest", | ||
currentProject: 0, | ||
removeCompleted: false, | ||
showCompleted: false, | ||
isSignedIn: false, | ||
}, | ||
} | ||
|
||
export default initialState |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters