Skip to content

Commit 8d21e64

Browse files
committed
Change todo to task to avoid confusion with TODO comment in TypeScript.
1 parent 852baf9 commit 8d21e64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/NewTodo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<option value="4">Yearly</option>
5757
<option value="5">Once</option></select
5858
><br />
59-
<button type="submit">Add Todo</button>
59+
<button type="submit">Add Task</button>
6060
</form>
6161
</template>
6262

src/store/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export default createStore({
432432
},
433433
create_Todo: (state, payload) => {
434434
/**
435-
* Create the task when user presses the Add Todo button.
435+
* Create the task when user presses the Add Task button.
436436
*/
437437
const createTask = {
438438
newId: payload.newId as number,
@@ -658,14 +658,14 @@ export default createStore({
658658
* Action to save task list data to local storage.
659659
* @param todos the task list data
660660
*/
661-
localStorage.setItem("todos", JSON.stringify(todos)); //save task list data
661+
localStorage.setItem("todos", JSON.stringify(todos)); //save task list data as JSON
662662
context.commit("setTodos", todos);
663663
},
664664
loadTodos(context) {
665665
/**
666666
* Action to load task list data to local storage.
667667
*/
668-
const todos = JSON.parse(localStorage.getItem("todos") as string); //load task list data
668+
const todos = JSON.parse(localStorage.getItem("todos") as string); //load task list data by parsing JSON string
669669
if (todos) {
670670
context.commit("setTodos", todos);
671671
}

0 commit comments

Comments
 (0)