From d267c5532378cfcefd55d3a9e9254469396c1163 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sun, 28 Mar 2021 13:19:38 +0200 Subject: [PATCH] compile --- src/App.tsx | 16 ++++++++-------- src/components/CardEntry.tsx | 2 ++ src/components/ContactForm.tsx | 2 +- src/components/SideNav.tsx | 2 +- src/controllers/MealController.tsx | 2 +- src/{index.tsx => index.jsx} | 0 src/layouts/MainLayout.tsx | 1 + src/pages/HomePage.tsx | 2 +- src/pages/NotFoundPage.tsx | 4 ++-- 9 files changed, 17 insertions(+), 14 deletions(-) rename src/{index.tsx => index.jsx} (100%) diff --git a/src/App.tsx b/src/App.tsx index e2450e3..649fe52 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, {FC, useState} from "react"; import { Router } from "./utils/router"; import { PreLoader } from "./components/PreLoader"; @@ -11,7 +11,7 @@ import "./index.css"; import MainLayout from "./layouts/MainLayout"; import MainRouter from "./controllers/MainRouter"; -export const App = () => { +export const App:FC = () => { const { loading } = useAuth0(); const [searchString, setSearchString] = useState(""); const [searchResults, setSearchResults] = useState({ meals: [] }); @@ -77,6 +77,7 @@ export const App = () => { }; const [meal, setMeal] = useState(mealDef); + const buttonUrl = "/random"; const getMeal = (id) => { getData(id, setMeal, "lookup"); @@ -95,23 +96,22 @@ export const App = () => { const handleChange = (e) => { const { value } = e.target; setSearchString(value); - }; - const buttonUrl = "/random"; + }; return loading ? (
) : ( - + { const { idMeal, strMeal, strMealThumb } = item; return ( diff --git a/src/components/ContactForm.tsx b/src/components/ContactForm.tsx index a85fda0..0023d31 100644 --- a/src/components/ContactForm.tsx +++ b/src/components/ContactForm.tsx @@ -97,7 +97,7 @@ const ContactFormTextArea = ({ id, value, dispatch }) => {