diff --git a/public/index.html b/public/index.html index ba78147..22a3db3 100644 --- a/public/index.html +++ b/public/index.html @@ -1,31 +1,22 @@ - - - - - - - - - - - + + + + + + + + + + + + Online Meal Planner | Chef's - - - -
- - - + + + +
+ + diff --git a/src/App.tsx b/src/App.tsx index 68e315d..a4d84be 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,23 +12,11 @@ export const App: FC = () => { const [searchString, setSearchString] = useState(""); const [searchResults, setSearchResults] = useState({ meals: [] }); const [meal, setMeal] = useState(null); - const buttonUrl = "/random"; const getRandomMeal = () => { getData("random", setMeal); }; - const getSearchResults = (e) => { - searchString === "" - ? e.preventDefault() - : getData(searchString, setSearchResults, "search"); - }; - - const handleChange = (e) => { - const { value } = e.target; - setSearchString(value); - }; - return loading ? (
@@ -36,19 +24,12 @@ export const App: FC = () => { ) : ( - + ); diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 865094d..af71ab9 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,9 +1,11 @@ -import React from "react"; +import { FC } from "react"; +import { links } from "../constants"; import { CopyrightText } from "./CopyrightText"; -import { GitHubLink } from "./GitHubLink"; import { FooterLink } from "./FooterLink"; +import { GitHubLink } from "./GitHubLink"; -export const Footer = ({ links }) => { +export const Footer: FC = () => { + const footerLinks = [...links, "random"]; return (