From 6e09897e02750ed4768aa02baeab64e688d2482a Mon Sep 17 00:00:00 2001 From: MurtazaShikari <114511800+MurtazaShikari@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:31:26 +0530 Subject: [PATCH] added the improved searchbar and buttons --- src/components/Body.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/Body.js b/src/components/Body.js index e2683b3..c813236 100644 --- a/src/components/Body.js +++ b/src/components/Body.js @@ -17,7 +17,9 @@ const useMountEffect = (fun) => const Body = () => { const [listOfRestaurants, setListOfRestaurants] = useState([]); - const [filteredListOfRestaurants, setFilteredListOfRestaurants] = useState([]); + const [filteredListOfRestaurants, setFilteredListOfRestaurants] = useState( + [] + ); let [favlist, setFavList] = useState([]); const [showFav, setShowFav] = useState(false); const [showBackBtn, setShowBackBtn] = useState(false); @@ -139,7 +141,7 @@ const Body = () => { ) : null} { initiateSearch()} > Search @@ -159,10 +161,11 @@ const Body = () => { { let filteredList = listOfRestaurants; if (!showFitler) { @@ -178,10 +181,11 @@ const Body = () => { Rating: 4.0+ { let favouriteList = listOfRestaurants; if (!showFav) { @@ -205,9 +209,7 @@ const Body = () => { - - Oops! - + Oops! The restaurant you're searching for doesn't exist.
The restaurant you're searching for doesn't exist.