From ccbe661ad2a5a54e2fc1fc036149cca86d086ff7 Mon Sep 17 00:00:00 2001
From: zohair <Zohair.ul.hasan@gmail.com>
Date: Wed, 3 Nov 2021 20:09:30 -0400
Subject: [PATCH] added more material-ui

---
 src/pages/home/components/SelectedItems.js |  9 ---------
 src/pages/recipe/Recipe.js                 |  9 ++++++---
 src/pages/results/Results.js               | 10 +++++++++-
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/pages/home/components/SelectedItems.js b/src/pages/home/components/SelectedItems.js
index 61dee23..6fa8bb5 100644
--- a/src/pages/home/components/SelectedItems.js
+++ b/src/pages/home/components/SelectedItems.js
@@ -15,16 +15,7 @@ function SelectedItems(props) {
             )
             }
         </List>
-        // items = <ul>
-        //     {props.data.map(ingredient =>
-        //         <li key={ingredient.id}>
-        //             {ingredient.name} {ingredient.id}
-        //         </li>
-        //     )
-        //     }
-        // </ul>
     } else {
-        // items = <Typography variant ="p">Searching...</Typography>
         items = <List>
             <ListItem>
                 <ListItemText
diff --git a/src/pages/recipe/Recipe.js b/src/pages/recipe/Recipe.js
index 8d44b10..9aca92e 100644
--- a/src/pages/recipe/Recipe.js
+++ b/src/pages/recipe/Recipe.js
@@ -28,13 +28,16 @@ function Recipe() {
         resp.then(r => setData(r.data));
     }, []) // eslint-disable-line react-hooks/exhaustive-deps
 
-    let body = <p>Loading...</p>;
+    let body = <Typography variant="p">Loading...</Typography>;
     if (data.length !== 0) {
         let pattern = /<.+>/;
         if (pattern.test(data.instructions)) {
             body = parse(data.instructions)
-        } else {
-            body = <p>{data.instructions}</p>;
+        } else if (data.instructions === "" || data.instructions === null){
+            body = <Typography variant="p">No instructions :(</Typography>
+        }
+         else {
+            body = <Typography variant="p">{data.instructions}</Typography>;
         }
     }
     
diff --git a/src/pages/results/Results.js b/src/pages/results/Results.js
index cfe0a4e..5f35eea 100644
--- a/src/pages/results/Results.js
+++ b/src/pages/results/Results.js
@@ -37,7 +37,15 @@ function Results() {
 
     const recipeComponent = recipes.map(recipe =>
     <Link to={"/recipe/" + recipe.id}>
-    <h3 key={recipe.id}>{recipe.title}</h3>
+    <Typography
+        variant="h5"
+        key={recipe.id}
+        sx = {{
+            mb: 2
+        }}
+        >
+            {recipe.title}
+        </Typography>
     </Link>
     )
 
-- 
GitLab