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 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments