File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 56
56
<option value =" 4" >Yearly</option >
57
57
<option value =" 5" >Once</option ></select
58
58
><br />
59
- <button type =" submit" >Add Todo </button >
59
+ <button type =" submit" >Add Task </button >
60
60
</form >
61
61
</template >
62
62
Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ export default createStore({
432
432
} ,
433
433
create_Todo : ( state , payload ) => {
434
434
/**
435
- * Create the task when user presses the Add Todo button.
435
+ * Create the task when user presses the Add Task button.
436
436
*/
437
437
const createTask = {
438
438
newId : payload . newId as number ,
@@ -658,14 +658,14 @@ export default createStore({
658
658
* Action to save task list data to local storage.
659
659
* @param todos the task list data
660
660
*/
661
- localStorage . setItem ( "todos" , JSON . stringify ( todos ) ) ; //save task list data
661
+ localStorage . setItem ( "todos" , JSON . stringify ( todos ) ) ; //save task list data as JSON
662
662
context . commit ( "setTodos" , todos ) ;
663
663
} ,
664
664
loadTodos ( context ) {
665
665
/**
666
666
* Action to load task list data to local storage.
667
667
*/
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
669
669
if ( todos ) {
670
670
context . commit ( "setTodos" , todos ) ;
671
671
}
You can’t perform that action at this time.
0 commit comments