diff --git a/client/src/App.js b/client/src/App.js index f50e8e6..7797202 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -1,5 +1,5 @@ import React from 'react' -import { BrowserRouter as Router, Route, Switch} from 'react-router-dom'; +import { BrowserRouter as Router, Route, Switch} from "react-router-dom"; import { ApolloClient, InMemoryCache, @@ -35,6 +35,10 @@ const client = new ApolloClient({ link: authLink.concat(httpLink), cache: new InMemoryCache(), }); + +console.log(client) + + function App() { return ( diff --git a/client/src/Pages/Options/index.js b/client/src/Pages/Options/index.js index 0db864c..86ba0a9 100644 --- a/client/src/Pages/Options/index.js +++ b/client/src/Pages/Options/index.js @@ -36,12 +36,7 @@ function Options(props) { // const handleProteinSelect = (e) => { // setProteinSelection(e) - // console.log(e) - // } - - const handleDietSelect = (e) => { - setDietSelection(e); - console.log(e); + }; const handleMealSelect = (e) => { @@ -110,9 +105,35 @@ function Options(props) { - + + + + + + + Meal Type + + + + + + + + + Dietary Preferences + + + + + + + + + + https://stackoverflow.com/questions/49078351/checkbox-not-working-in-react + @@ -120,111 +141,5 @@ function Options(props) { ); }; - /*

What do you want to eat today?

- -

Protein Choice

- - - Beef - Chicken - Fish - Pork - Veggies - - -
- - -

Dietary Preferences

- - - Vegetarian - Vegan - Pescatarian - Not Picky - - -
- - -

Meal Course

- - - Breakfast - Lunch - Dinner - Snack - Not Picky - - -
- - -

Allergies

- - {["checkbox"].map((type) => ( -
- choicesArr.push(e.currentTarget.value)} - /> - { - choicesArr.push(e.currentTarget.value); - }} - /> - choicesArr.push(e.currentTarget.value)} - /> - - - - - -
- ))} -
-
- */ - - - - + export default Options; diff --git a/client/src/Pages/Search.js b/client/src/Pages/Search.js index ffb0ac9..25624de 100644 --- a/client/src/Pages/Search.js +++ b/client/src/Pages/Search.js @@ -21,6 +21,8 @@ function Search() { console.log(e) } + + const onChange = (e) => { const checked = e.target.checked; const newFormInfo = { diff --git a/client/src/components/Recipe/index.js b/client/src/components/Recipe/index.js index 12cdf1d..d08154b 100644 --- a/client/src/components/Recipe/index.js +++ b/client/src/components/Recipe/index.js @@ -9,16 +9,27 @@ function Recipe(props) { {/* */} + + {/* {props.data.recipe.label} */} + {/* */} + {/* {props.data.recipe.ingredientLines.map(ingredient=>{ + {/* {props.data.recipe.label} {props.data.recipe.ingredientLines.map(ingredient=>{ + return(

{ingredient}

) + + })} */} + {/*
*/} + })}
*/} +