diff --git a/src/components/Child.js b/src/components/Child.js index 5beef15..4baf672 100644 --- a/src/components/Child.js +++ b/src/components/Child.js @@ -107,24 +107,18 @@ class Child extends Component { * update state which tracks all currently checked questions */ handleViewMenu(e) { - console.log('got to handleViewMenu'); - console.log('e.target.id: ' + e.target.id); switch(e.target.id) { case 'edit-link': this.setState({ viewState: 'edit' }) - - console.log('got to edit-link') break; case 'delete-link': - console.log('got to delete-link') break; case 'read-link': this.setState({ viewState: 'read' }) - console.log('got to read-link') break; default: break; @@ -147,9 +141,6 @@ class Child extends Component { let questionsObj = {}; let questionIdx; - //console.log('shortCategory: ' + shortCategory); - //console.log('question: ' + question); - if (e.target.checked) { //add question to array questionsAr = this.state[shortCategory] ? this.state[shortCategory].slice(0) : []; @@ -174,15 +165,11 @@ class Child extends Component { * Event handler for button click (Get Random Questions) */ handleSaveButton(e) { - console.log('clicked Save'); - //const listNameInput = document.getElementById('list-name-inp'); var listObj = {}; let questionsAr = []; let db; const key = this.state.key; - // console.log('listNameInput.value: ' + listNameInput.value) - CATEGORIES.forEach((categ) => { let categObj = {}; categObj[categ] = this.state[categ]; @@ -192,12 +179,9 @@ class Child extends Component { listObj.name = this.state.name; listObj.questions = questionsAr; -//TODO 032717 need to update this to update an existing entry (this is probably creating a new one) localforage.setItem(key, listObj).then(function(value) { - console.log('update list'); }).catch(function(err) { // This code runs if there were any errors - console.log(err); }); } @@ -246,26 +230,6 @@ class Child extends Component { ) }); - - - - - // //console.log('renderRandomQuestions'); - // var randomIdxList; - // var questionsList = h5bp_interview.questions.map((questionSet, idx) => { - // //randomIdxList = getRandomIndexList(questionSet.id, this.state[questionSet.id]); - // var editQuestions = this.renderQuestions(idx); - // //console.log('randomIdxList: ' + randomIdxList); - // return ( - //