File tree Expand file tree Collapse file tree 18 files changed +54
-54
lines changed
Finished App/src/components Expand file tree Collapse file tree 18 files changed +54
-54
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88 // 1. Stop the form from submitting
99 event . preventDefault ( ) ;
1010 // 2. get the text from that input
11- const storeName = this . myInput . value . value ;
11+ const storeName = this . myInput . current . value ;
1212 // 3. Change the page to /store/whatever-they-entered
1313 this . props . history . push ( `/store/${ storeName } ` ) ;
1414 } ;
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111 // 1. stop the form from submitting
1212 event . preventDefault ( ) ;
1313 const fish = {
14- name : this . nameRef . value . value ,
15- price : parseFloat ( this . priceRef . value . value ) ,
16- status : this . statusRef . value . value ,
17- desc : this . descRef . value . value ,
18- image : this . imageRef . value . value
14+ name : this . nameRef . current . value ,
15+ price : parseFloat ( this . priceRef . current . value ) ,
16+ status : this . statusRef . current . value ,
17+ desc : this . descRef . current . value ,
18+ image : this . imageRef . current . value
1919 } ;
2020 this . props . addFish ( fish ) ;
2121 // refresh the form
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88 // 1. Stop the form from submitting
99 event . preventDefault ( ) ;
1010 // 2. get the text from that input
11- const storeName = this . myInput . value . value ;
11+ const storeName = this . myInput . current . value ;
1212 // 3. Change the page to /store/whatever-they-entered
1313 this . props . history . push ( `/store/${ storeName } ` ) ;
1414 } ;
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111 // 1. stop the form from submitting
1212 event . preventDefault ( ) ;
1313 const fish = {
14- name : this . nameRef . value . value ,
15- price : parseFloat ( this . priceRef . value . value ) ,
16- status : this . statusRef . value . value ,
17- desc : this . descRef . value . value ,
18- image : this . imageRef . value . value
14+ name : this . nameRef . current . value ,
15+ price : parseFloat ( this . priceRef . current . value ) ,
16+ status : this . statusRef . current . value ,
17+ desc : this . descRef . current . value ,
18+ image : this . imageRef . current . value
1919 } ;
2020 this . props . addFish ( fish ) ;
2121 // refresh the form
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88 // 1. Stop the form from submitting
99 event . preventDefault ( ) ;
1010 // 2. get the text from that input
11- const storeName = this . myInput . value . value ;
11+ const storeName = this . myInput . current . value ;
1212 // 3. Change the page to /store/whatever-they-entered
1313 this . props . history . push ( `/store/${ storeName } ` ) ;
1414 } ;
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111 // 1. stop the form from submitting
1212 event . preventDefault ( ) ;
1313 const fish = {
14- name : this . nameRef . value . value ,
15- price : parseFloat ( this . priceRef . value . value ) ,
16- status : this . statusRef . value . value ,
17- desc : this . descRef . value . value ,
18- image : this . imageRef . value . value
14+ name : this . nameRef . current . value ,
15+ price : parseFloat ( this . priceRef . current . value ) ,
16+ status : this . statusRef . current . value ,
17+ desc : this . descRef . current . value ,
18+ image : this . imageRef . current . value
1919 } ;
2020 this . props . addFish ( fish ) ;
2121 // refresh the form
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88 // 1. Stop the form from submitting
99 event . preventDefault ( ) ;
1010 // 2. get the text from that input
11- const storeName = this . myInput . value . value ;
11+ const storeName = this . myInput . current . value ;
1212 // 3. Change the page to /store/whatever-they-entered
1313 this . props . history . push ( `/store/${ storeName } ` ) ;
1414 } ;
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111 // 1. stop the form from submitting
1212 event . preventDefault ( ) ;
1313 const fish = {
14- name : this . nameRef . value . value ,
15- price : parseFloat ( this . priceRef . value . value ) ,
16- status : this . statusRef . value . value ,
17- desc : this . descRef . value . value ,
18- image : this . imageRef . value . value
14+ name : this . nameRef . current . value ,
15+ price : parseFloat ( this . priceRef . current . value ) ,
16+ status : this . statusRef . current . value ,
17+ desc : this . descRef . current . value ,
18+ image : this . imageRef . current . value
1919 } ;
2020 this . props . addFish ( fish ) ;
2121 // refresh the form
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class StorePicker extends React.Component {
88 // 1. Stop the form from submitting
99 event . preventDefault ( ) ;
1010 // 2. get the text from that input
11- const storeName = this . myInput . value . value ;
11+ const storeName = this . myInput . current . value ;
1212 // 3. Change the page to /store/whatever-they-entered
1313 this . props . history . push ( `/store/${ storeName } ` ) ;
1414 } ;
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ class AddFishForm extends React.Component {
1111 // 1. stop the form from submitting
1212 event . preventDefault ( ) ;
1313 const fish = {
14- name : this . nameRef . value . value ,
15- price : parseFloat ( this . priceRef . value . value ) ,
16- status : this . statusRef . value . value ,
17- desc : this . descRef . value . value ,
18- image : this . imageRef . value . value
14+ name : this . nameRef . current . value ,
15+ price : parseFloat ( this . priceRef . current . value ) ,
16+ status : this . statusRef . current . value ,
17+ desc : this . descRef . current . value ,
18+ image : this . imageRef . current . value
1919 } ;
2020 this . props . addFish ( fish ) ;
2121 // refresh the form
You can’t perform that action at this time.
0 commit comments