(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,function(e,t){var a=[{title:"Paneer Tikka Masala",ingredients:"1 large onion, roughly chopped, 3-4 medium tomatoes, roughly chopped, 1/2 teaspoon cumin seeds, 1 cinnamon stick, 3-4 garlic cloves, crushed, 1/2 inch ginger, cut into small pieces, 1.5 teaspoon curry powder, 1 tablespoon sugar, 2 tablespoons cream, 2 tablespoon chopped cilantro leaves, and some more to garnish, 1 cup water, 1 tablespoon oil, 1 tablespoon salted butter, salt",instructions:"Heat 1 tbsp of butter and 1 tbsp of oil in a pan. Once hot add cinnamon stick and cumin seeds. Once the seeds crackle, add the chopped onions, crushed garlic pods and chopped ginger. Fry till onions turn golden brown in color. Once onions are done, add the tomatoes and the curry powder and mix. Also add the the salt and sugar. Cook the tomatoes on medium flame till they are soft, around 6-7 minutes. Once the mixture is cooked, switch off the flame and allow it to cool a bit. Pour the mixture into a blender and puree it. Set aside. Roast the marinated paneer till golden brown in color from both sides. Pour the pureed masala in a wok/kadhai and add water to it. Stir and add cream and chopped coriander leaves. Cover and cook for 4-5 minutes on medium-low flame. Add the roasted paneer pieces, let it simmer for 2-3 minutes. Switch off the flame and garnish with chopped coriander leaves and cream. Serve hot with butter naan or any bread of your choice.",image:"https://www.thespruceeats.com/thmb/Glh-K9bw9-Px4bCjydHrq8KkkWs=/960x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/paneer-butter-masala-or-cheese-cottage-curry--popular-indian-lunch-dinner-menu-in-weddings-or-parties--selective-focus-669329084-5acac5acc67335003764a3bc.jpg"},{title:"Chana Masala",ingredients:"1 tablespoon olive oil, 1 large onion, chopped 2 to 3 garlic cloves, Two 15- to 16-ounce cans chickpeas, 1 to 2 teaspoons garam masala or good-quality curry powder, 1/2 teaspoon turmeric, 2 teaspoons grated fresh or jarred ginger, 2 large tomatoes, 1 tablespoon lemon juice, 1/4 cup minced fresh cilantro, Salt",instructions:" Heat the oil in a wide skillet. Add the onion and saut\xc8 until translucent. Add the garlic and continue to saut\xc8 until the onion is golden. Add the chickpeas, garam masala, turmeric, ginger, tomatoes, lemon juice, and about 1/4 cup water. Bring to a simmer, then cook over medium-low heat for 10 minutes, stirring frequently. This should be moist and stewlike, but not soupy; add a little more water, if needed. Stir in the cilantro and season with salt. Serve on its own in shallow bowls or over a hot cooked grain, if desired.",image:"https://www.seriouseats.com/recipes/images/2016/03/20160328-channa-masala-recipe-6-1500x1125.jpg"},{title:"Chicken Fried Rice",ingredients:"2 tbsp. extra-virgin olive oil, 3 chicken breasts, Kosher salt, Freshly ground black pepper, 2 tbsp. sesame oil, 1 medium onion, 2 carrots, 3 cloves garlic, 1 tbsp. freshly minced ginger, 4 cups cooked white rice, 3/4 cup frozen peas, 3 large eggs, 3 tbsp. low-sodium soy sauce, 2 green onions",instructions:"In a medium skillet over medium heat, heat olive oil. Season chicken with salt and pepper on both sides, then add to skillet, and cook until golden and no longer pink, 8 minutes per side. Remove from skillet and let rest 5 minutes, then cut into bite-sized pieces. To the same skillet, heat 1 tablespoon sesame oil. Add onion and carrots and cook until soft, 5 minutes, Add garlic and ginger and cook until fragrant, 1 minute more. Stir in rice and peas and cook until warmed through, 2 minutes. Push rice to one side of skillet and add remaining tablespoon sesame oil to other side. Add egg and stir until almost fully cooked, then fold eggs into rice. Add chicken back to skillet with soy sauce and green onions and stir to combine.",image:"https://food.fnr.sndimg.com/content/dam/images/food/fullset/2018/3/29/0/RX-Kraft_Chicken-Fried-Rice-Sticks_s4x3.jpg.rend.hgtvcom.826.620.suffix/1522358458773.jpeg"},{title:"Tamarind Rice",ingredients:"\u03a9 teaspoon Chana dal, \u03a9 teaspoon Urad dal, 1/8 teaspoon Mustard seeds, \u03a9 teaspoon Cumin seeds, \xba teaspoon Black peppercorns, \u03a9 teaspoon Fennel seeds, 5-6 Curry leaves, 2 Dried red chilies, 2 teaspoon Tamarind paste or small lemon size tamarind ball, 1 cup Water (Boiling hot), 3 cups Cooked rice, 1 tablespoon Oil, \xba teaspoon Mustard seeds, 1 Dried red chilies, 4-5 Curry leaves, 2 tablespoons Peanuts, \xba teaspoon Turmeric powder, Salt, 1 teaspoon Jaggery, 1 tablespoon Sesame seeds",instructions:"First, cook the rice and let it cool. Dry roast the sesame seeds on medium heat till it get light brown. They will start to pop and you will get nice aroma of toasted seeds. Remove it to the plate and let it cool completely. Once cooled grind it coarsely and keep it aside. If using tamarind paste then dissolve it into 1 cup of hot water. Take all the spices into a pan and turn the heat on medium. Dry roast them with stirring constantly till they get light brown color. Remove it to another plate and let it cool completely. Heat the oil in a pan on medium heat. Once hot add mustard seeds. Let them pop. Then add dry red chili and curry leaves. Saute for a minute. Add peanuts. and roast it till it gets light brown. Then add tamarind water. Add freshly ground spice powder, turmeric powder, jaggery and salt. Mix and let it simmer. Cook till it thicken and become a paste like consistency. Then add cooked rice. Mix gently till all the masala paste it coated to the rice evenly. Cook for 2 minutes and turn off the stove. Lastly garnish with sesame powder.",image:"http://www.ndtv.com/cooks/images/tamarind.000.rice.jpg"},{title:"Tomato Pickle",ingredients:"500 gm chopped,washed & dried tomato, 2 tablespoon powdered red chilli, 1 teaspoon powdered mustard powder, 1 teaspoon powdered fenugreek seeds, 1 tablespoon powdered sea salt, 150 ml sesame oil, 1 teaspoon powdered asafoetida, 3/4 cup Tamarind Extract",instructions:"Step 1: For making this spicy side dish recipe, start with heating mustard oil in a pan. Step 2: Add asafoetida powder and stir for 10 seconds. Step 3: Then, add the chopped tomatoes and saute well. Step 4: Add tamarind extract, salt, red chilli powder and cook till water has almost evaporated and tomatoes have changed colour. Step 5: When the oil starts to float, add mustard powder, vendhaya powder and mix well. Step 6: Transfer to a clean jar and cover with a lid. Use as required.",image:"https://vaya.in/recipes/wp-content/uploads/2018/03/Tomato-Pickle.jpg"},{title:"Spinach Dal",ingredients:"1/2 cup toor dal/arhar dal, 1/4 cup moong dal dhuli, 2.5 cups water, 1/2 teaspoon salt, 1/4 teaspoon turmeric powder, 2 teaspoons vegetable oil, 1/2 teaspoon mustard seeds, 1/4 teaspoon cumin seeds, 2 large garlic cloves, 1 large tomato, 1 green chili, 1.25 cups finely chopped spinach, 1/4 cup water, 1/4 teaspoon garam masala powder, salt, 1-2 teaspoon lemon juice",instructions:"To a pressure cooker add the washed lentils, add 2.5 cups water, 1/2 teaspoon salt and 1/4 teaspoon turmeric powder. Cook at high flame for 2 whistles, then lower the flame and cook for another 7-8 minutes or till lentils are completely cooked. Let the pressure of the cooker come off on it's own. Set aside. In case you don't have a pressure cooker, cook the lentils in a pan till completely cooked. Heat oil in a pan on medium heat. Once the oil is hot, add cumin seeds and mustard seeds. Wait till cumin seeds crackle and mustard seeds start popping out. Once the seeds start crackling, add chopped garlic and green chili. Saute for a minute or till garlic just starts turning golden brown in color. Add chopped tomatoes, salt and cook for 2 minutes. We don't want to overcook the tomatoes here. Add chopped spinach and mix. Cook for 2-3 minutes or till there's no raw smell of tomatoes or spinach. Add the cooked dal to the pan and let it all come to a boil. Lower the heat, add more water if needed (I did add 1/4 water here) and let the dal simmer for 5 minutes. Check the salt and adjust to taste. Sprinkle garam on top and remove pan from heat. Squeeze in some fresh lemon juice and serve spinach dal with any bread or steamed rice!",image:"https://162790-470681-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2017/08/Lentils-with-spinach-Instant-Pot.-Pressure-Cooker-Dal-Palak.jpg"},{title:"Samosa",ingredients:"3/4 teaspoon salt, 2 1/4 cups self-rising flour, 6 tablespoons (3/4 stick) butter, 9 tablespoons water, 1 1/2 pounds potatoes, 1 cup fresh vegetables (corn, carrots and peas), 2 tablespoons vegetable oil, 1 medium onion, 1 teaspoon finely chopped garlic, 1 1/2 teaspoons finely chopped fresh ginger, 1/2 habenero chile, 1/2 teaspoon garam masala spice blend, 1/2 teaspoon turmeric, 1 teaspoon red chile powder, 1 1/2 teaspoons salt, 1/2 lemon, 2 tablespoons chopped fresh coriander leaves, Vegetable oil",instructions:"Mix the salt and flour in a medium bowl or a food processor. With a pastry blender, incorporate the butter until crumbs have formed. Add the water a few tablespoons at a time, until you can form a ball. Knead the dough for about 5 minutes. Let it rest for about 15 minutes more. You can prepare the dough in advance and refrigerate it. Boil the potatoes until tender. Drain and set aside. If using fresh carrots, chop and simmer in water, to cover, in a small pot. Add the corn and peas to barely cook. Set aside to cool. Heat the oil in a pan and fry the onion until golden. Add the garlic, ginger, and chile and cook for 2 minutes. Add the garam masala, turmeric, chile powder, and salt and cook 2 minutes more. In a bowl combine the mashed potatoes, the onion and spice mixture, carrots, peas, corn, lemon juice, and chopped coriander. Mix well. Divide the dough into 9 equal size balls. On a floured surface, roll each ball into a 5-inch circle. Cut each circle in half. Brush the straightedge side with a little water, fold it in half, and align the two straight sides so they overlap to form a cone shape. Squeeze the edges together to make a tight seal. Place approximately 1 generous tablespoon of filling inside each cone, leaving the top edge clean. Moisten the inside top rim of the cone and press the edges together to make another tight seal. Place the samosas on a tray until ready to fry. Repeat with the remaining dough and filling. Heat approximately 3 inches of vegetable oil in a deep saucepan. Fry several samosas at a time, being careful not to crowd them. When 1 side turns golden brown, flip it over to brown on the other side. Drain on paper towels. Serve with chutney.",image:"https://fabfoodies.in/wp-content/uploads/2019/01/Potato-Samosa.jpg"}];e.exports={recipes:a,addRecipe:function(e){var t=e.title,n=e.ingredients,i=e.instructions,o=e.image;a.push({title:t,ingredients:n,instructions:i,image:o})}}},,,,,,,,function(e,t,a){e.exports=a(23)},,,,,,function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){"use strict";a.r(t);var n=a(0),i=a.n(n),o=a(4),r=a.n(o),s=(a(16),a(5)),l=a(6),c=a(9),d=a(7),h=a(1),p=a(8),m=(a(17),a(18),function(e){var t=e.showDetails,a=e.image,n=e.title;return i.a.createElement("div",{className:"recipe"},i.a.createElement("div",{className:"image"},i.a.createElement("img",{alt:"food",src:a})),i.a.createElement("div",null,i.a.createElement("h2",{onClick:t},n)))}),u=function(e){var t=e.recipes,a=e.showDetails;return i.a.createElement("div",{className:"recipes"},t.map(function(e,t){return i.a.createElement(m,{key:t,showDetails:a,title:e.title,image:e.image})}))},g=a(2),f=a.n(g),w=(a(19),function(e){var t=e.searchChange;return i.a.createElement("div",{className:"searchBox"},i.a.createElement("input",{type:"search",placeholder:"search recipes",onChange:t}))}),b=(a(20),function(e){var t=e.openRecipeForm;return i.a.createElement("div",{className:"addRecipe"},i.a.createElement("button",{onClick:t},"Add New Recipe"))}),v=(a(21),function(e){var t=e.cancel,a=e.titleChange,n=e.ingredientsChange,o=e.instructionsChange,r=e.imageChange,s=e.submitRecipe,l=e.showerror;return i.a.createElement("div",{className:"newRecipeForm"},i.a.createElement("div",{className:"recipe-title"},i.a.createElement("label",null,"Recipe title:"),i.a.createElement("input",{onChange:a,type:"text",placeholder:"Enter title of the recipe"})),i.a.createElement("div",{className:"recipe-ingredients"},i.a.createElement("label",null,"Enter ingredients for the recipe:"),i.a.createElement("textarea",{rows:"5",cols:"50",onChange:n,type:"text",placeholder:"Enter ingredients for the recipe"})),i.a.createElement("div",{className:"recipe-instructions"},i.a.createElement("label",null,"Enter instructions for the recipe:"),i.a.createElement("textarea",{rows:"5",cols:"50",onChange:o,type:"text",placeholder:"Enter instructions for the recipe"})),i.a.createElement("div",{className:"recipe-image"},i.a.createElement("label",null,"Add Image url:"),i.a.createElement("input",{onChange:r,type:"text",placeholder:"Enter image url"})),i.a.createElement("div",{className:"button-area"},i.a.createElement("button",{onClick:s},"Submit Recipe"),i.a.createElement("button",{onClick:t},"Cancel")),l)}),k=(a(22),function(e){var t=e.showAllRecipes,a=e.recipe;return i.a.createElement("div",null,i.a.createElement("button",{onClick:t},"See all recipes"),i.a.createElement("div",{className:"recipeDetails"},i.a.createElement("div",{className:"title"},i.a.createElement("label",null,"Title:"),i.a.createElement("div",null,a.title)),i.a.createElement("div",{className:"images"},i.a.createElement("img",{alt:"food",src:a.image})),i.a.createElement("div",{className:"ingredients"},i.a.createElement("label",null,"Ingredients:"),i.a.createElement("div",null,a.ingredients)),i.a.createElement("div",{className:"instructions"},i.a.createElement("label",null,"Instructions:"),i.a.createElement("div",null,a.instructions))))}),y=function(e,t,a,n){return fetch("/recipes",{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify({title:e,ingredients:t,instructions:a,image:n})}).catch(function(e){return Promise.reject({error:"service-error",err:e})}).then(function(e){return e.ok?e.json():Promise.reject({error:"service-complaint",err:e.statusText})})},C=function(){return fetch("/recipes").catch(function(e){return Promise.reject({error:"service-error",err:e})}).then(function(e){return e.ok?e.json():Promise.reject({error:"service-complaint",err:e.statusText})})},E=function(e){function t(){var e;return Object(s.a)(this,t),(e=Object(c.a)(this,Object(d.a)(t).call(this))).handleSearchChange=function(t){e.setState({searchfield:t.target.value})},e.openRecipeForm=function(){e.setState({recipeFormPage:!0,allRecipesPage:!1})},e.handleCancelClick=function(){e.setState({recipes:f.a.recipes,searchfield:"",title:"",ingredients:"",instructions:"",image:"",recipeFormPage:!1,detailsPage:!1,allRecipesPage:!0,selectedRecipe:null})},e.handleTitleChange=function(t){e.setState({title:t.target.value})},e.handleIngredientsChange=function(t){e.setState({ingredients:t.target.value})},e.handleInstructionsChange=function(t){e.setState({instructions:t.target.value})},e.handleImageChange=function(t){e.setState({image:t.target.value})},e.handleSubmitRecipe=function(){var t=e.state.title,a=e.state.ingredients,n=e.state.instructions,i=e.state.image;""!==t&&""!==a&&""!==n?y(t,a,n,i).then(function(t){e.setState({recipes:f.a.recipes,searchfield:"",title:"",ingredients:"",instructions:"",image:"",selectedRecipe:t,recipeFormPage:!1,detailsPage:!0,allRecipesPage:!1,error:!1})}):e.setState({error:!0})},e.showAllRecipes=function(){C().then(function(t){var a=t.recipes;e.setState({recipes:a,searchfield:"",title:"",ingredients:"",instructions:"",image:"",selectedRecipe:null,recipeFormPage:!1,detailsPage:!1,allRecipesPage:!0,error:!1})})},e.showDetails=function(t){var a=e.state.recipes.find(function(e){return e.title===t.target.innerHTML});e.setState({selectedRecipe:a,recipeFormPage:!1,detailsPage:!0,allRecipesPage:!1})},e.state={recipes:f.a.recipes,searchfield:"",title:"",ingredients:"",instructions:"",image:"",recipeFormPage:!1,detailsPage:!1,allRecipesPage:!0,selectedRecipe:null,error:!1},e.handleSearchChange=e.handleSearchChange.bind(Object(h.a)(e)),e.openRecipeForm=e.openRecipeForm.bind(Object(h.a)(e)),e.handleCancelClick=e.handleCancelClick.bind(Object(h.a)(e)),e.handleTitleChange=e.handleTitleChange.bind(Object(h.a)(e)),e.handleIngredientsChange=e.handleIngredientsChange.bind(Object(h.a)(e)),e.handleInstructionsChange=e.handleInstructionsChange.bind(Object(h.a)(e)),e.handleImageChange=e.handleImageChange.bind(Object(h.a)(e)),e.handleSubmitRecipe=e.handleSubmitRecipe.bind(Object(h.a)(e)),e.showAllRecipes=e.showAllRecipes.bind(Object(h.a)(e)),e.showDetails=e.showDetails.bind(Object(h.a)(e)),e}return Object(p.a)(t,e),Object(l.a)(t,[{key:"showError",value:function(e){if(e)return i.a.createElement("div",{className:"error"},i.a.createElement("div",null,"*All Fields Are Mandatory"))}},{key:"componentDidMount",value:function(){this.poll()}},{key:"poll",value:function(){var e=this;setTimeout(function(){e.showAllRecipes().then(function(){return e.poll()})},5e3)}},{key:"render",value:function(){var e=this;if(this.state.allRecipesPage){var t=this.state.recipes.filter(function(t){return t.title.toLowerCase().includes(e.state.searchfield.toLowerCase())});return i.a.createElement("div",{className:"App"},i.a.createElement(w,{searchChange:this.handleSearchChange}),i.a.createElement(b,{openRecipeForm:this.openRecipeForm}),i.a.createElement("div",null,i.a.createElement(u,{recipes:t,showDetails:this.showDetails})))}return this.state.recipeFormPage?i.a.createElement("div",{className:"App"},i.a.createElement(v,{cancel:this.showAllRecipes,titleChange:this.handleTitleChange,ingredientsChange:this.handleIngredientsChange,instructionsChange:this.handleInstructionsChange,imageChange:this.handleImageChange,submitRecipe:this.handleSubmitRecipe,showerror:this.showError(this.state.error)})):this.state.detailsPage?i.a.createElement("div",{className:"App"},i.a.createElement(k,{showAllRecipes:this.showAllRecipes,recipe:this.state.selectedRecipe})):void 0}}]),t}(n.Component);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));r.a.render(i.a.createElement(E,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}],[[10,1,2]]]);
//# sourceMappingURL=main.d4dbae43.chunk.js.map