File tree Expand file tree Collapse file tree 8 files changed +27
-17
lines changed Expand file tree Collapse file tree 8 files changed +27
-17
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ function BeerAndWineBoozeTab() {
7
7
< ScrollView >
8
8
< Text style = { { marginTop : 20 } } > Beer and Wine</ Text >
9
9
< View style = { styles . IngredientContainer } >
10
- { Constants . beerWine . map ( ( drink ) => {
11
- return < IngredientCheckBox key = { drink } > { drink } </ IngredientCheckBox >
10
+ { Constants . beerWine . map ( ( booze ) => {
11
+ return < IngredientCheckBox key = { booze } ingredient = { booze } > { booze } </ IngredientCheckBox >
12
12
} ) }
13
13
</ View >
14
14
</ ScrollView >
Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ import CheckBox from "react-native-check-box";
4
4
import IngredientCheckBox from "../../components/IngredientCheckBox" ;
5
5
import { Constants } from "../../util/constants" ;
6
6
7
+
7
8
function DarkBoozeTab ( ) {
9
+
8
10
return (
9
11
< ScrollView >
10
12
< Text style = { { marginTop : 20 } } > Dark Booze</ Text >
11
13
< View style = { styles . IngredientContainer } >
12
- { Constants . brownDrinks . map ( ( drink ) => {
13
- return < IngredientCheckBox key = { drink } > { drink } </ IngredientCheckBox >
14
+ { Constants . brownBooze . map ( ( booze ) => {
15
+ return < IngredientCheckBox key = { booze } ingredient = { booze } > { booze } </ IngredientCheckBox >
14
16
} ) }
15
17
</ View >
16
18
</ ScrollView >
Original file line number Diff line number Diff line change @@ -7,8 +7,12 @@ function FruityBoozeTab() {
7
7
< ScrollView >
8
8
< Text style = { { marginTop : 20 } } > Fruity Booze</ Text >
9
9
< View style = { styles . IngredientContainer } >
10
- { Constants . fruitDrinks . map ( ( drink ) => {
11
- return < IngredientCheckBox key = { drink } > { drink } </ IngredientCheckBox >
10
+ { Constants . fruitBooze . map ( ( booze ) => {
11
+ return (
12
+ < IngredientCheckBox key = { booze } ingredient = { booze } >
13
+ { booze }
14
+ </ IngredientCheckBox >
15
+ ) ;
12
16
} ) }
13
17
</ View >
14
18
</ ScrollView >
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ function LightBoozeTab() {
20
20
< ScrollView >
21
21
< Text style = { { marginTop : 20 } } > Light Booze</ Text >
22
22
< View style = { styles . IngredientContainer } >
23
- { Constants . clearBooze . map ( ( drink ) => {
23
+ { Constants . clearBooze . map ( ( booze ) => {
24
24
return (
25
- < IngredientCheckBox key = { drink } booze = { drink } >
26
- { drink }
25
+ < IngredientCheckBox key = { booze } ingredient = { booze } >
26
+ { booze }
27
27
</ IngredientCheckBox >
28
28
) ;
29
29
} ) }
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ function MixersTab() {
7
7
< ScrollView >
8
8
< Text style = { { marginTop : 20 } } > Mixers</ Text >
9
9
< View style = { styles . IngredientContainer } >
10
- { Constants . mixers . map ( ( drink ) => {
11
- return < IngredientCheckBox key = { drink } > { drink } </ IngredientCheckBox >
10
+ { Constants . mixers . map ( ( mixer ) => {
11
+ return < IngredientCheckBox key = { mixer } ingredient = { mixer } > { mixer } </ IngredientCheckBox >
12
12
} ) }
13
13
</ View >
14
14
</ ScrollView >
Original file line number Diff line number Diff line change @@ -7,8 +7,12 @@ function ProduceTab() {
7
7
< ScrollView >
8
8
< Text style = { { marginTop : 20 } } > Produce</ Text >
9
9
< View style = { styles . IngredientContainer } >
10
- { Constants . produce . map ( ( drink ) => {
11
- return < IngredientCheckBox key = { drink } > { drink } </ IngredientCheckBox >
10
+ { Constants . produce . map ( ( produce ) => {
11
+ return (
12
+ < IngredientCheckBox key = { produce } ingredient = { produce } >
13
+ { produce }
14
+ </ IngredientCheckBox >
15
+ ) ;
12
16
} ) }
13
17
</ View >
14
18
</ ScrollView >
Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ function IngredientCheckBox(props) {
17
17
{
18
18
if ( CheckBoxState === true ) {
19
19
setCheckBoxState ( false ) ;
20
- dispatch ( removeIngredient ( props . booze ) ) ;
20
+ dispatch ( removeIngredient ( props . ingredient ) ) ;
21
21
} else {
22
22
setCheckBoxState ( true ) ;
23
- dispatch ( addIngredient ( props . booze ) ) ;
23
+ dispatch ( addIngredient ( props . ingredient ) ) ;
24
24
}
25
25
}
26
26
}
Original file line number Diff line number Diff line change 1
1
export const Constants = {
2
- brownDrinks : [
2
+ brownBooze : [
3
3
"Bourbon",
4
4
"Scotch",
5
5
"Coffee Liqueur",
@@ -47,7 +47,7 @@ export const Constants = {
47
47
"Cranberry Vodka",
48
48
"Vanilla Vodka",
49
49
],
50
- fruitDrinks : [
50
+ fruitBooze : [
51
51
"Absinthe",
52
52
"Irish Cream",
53
53
"Triple Sec",
You can’t perform that action at this time.
0 commit comments