File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class Main extends Component {
19
19
}
20
20
21
21
onDishSelect ( dishId ) {
22
+ // alert(dishId);
22
23
this . setState ( {
23
24
selectedDish : dishId
24
25
} ) ;
@@ -37,7 +38,7 @@ class Main extends Component {
37
38
</ Navbar >
38
39
39
40
< Menu dishes = { this . state . dishes }
40
- onClick = { ( dishId ) => this . onDishSelect ( dishId ) } />
41
+ onClickP = { ( dishId ) => this . onDishSelect ( dishId ) } />
41
42
42
43
< DishDetail dish = { this . state . dishes . filter ( ( dish ) => dish . id === this . state . selectedDish ) [ 0 ] } />
43
44
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Menu extends Component{
20
20
const menu = this . props . dishes . map ( ( dish ) => {
21
21
return (
22
22
< div key = { dish . id } className = "col-12 col-md-5 m-1" >
23
- < Card onClick = { ( ) => this . props . onClick ( dish . id ) } >
23
+ < Card onClick = { ( ) => this . props . onClickP ( dish . id ) } >
24
24
< CardImg width = "100%" src = { dish . image } alt = { dish . name } />
25
25
< CardImgOverlay >
26
26
< CardTitle > { dish . name } </ CardTitle >
You can’t perform that action at this time.
0 commit comments