diff --git a/webapp/package.json b/webapp/package.json index 099be7e..83d7066 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -51,10 +51,10 @@ ] }, "devDependencies": { - "@types/express": "^4.17.13", - "@types/react-router-dom": "^5.1.8", - "@testing-library/jest-dom": "^5.16.2", + "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^11.2.7", - "@testing-library/user-event": "^12.8.3" + "@testing-library/user-event": "^12.8.3", + "@types/express": "^4.17.13", + "@types/react-router-dom": "^5.1.8" } } diff --git a/webapp/src/api/api.ts b/webapp/src/api/api.ts deleted file mode 100644 index 9cf67db..0000000 --- a/webapp/src/api/api.ts +++ /dev/null @@ -1,16 +0,0 @@ -export {} -//import {Product} from '../shared/shareddtypes'; - -/* -export async function getProducts():Promise{ - const response = await fetch('https://fakestoreapi.com/products'); - const data = await response.json(); - return data; -}*/ - -/* -export async function getProducts(): Promise { - const apiEndPoint = process...env.REACT_APP_ARI_URI || "http://localhost:5000"; - let response = await fetch(apiEndPoint + "/product/list"); - return response.json(); -}*/ diff --git a/webapp/src/components/Navigation.tsx b/webapp/src/components/Navigation.tsx index dca58ed..100855b 100644 --- a/webapp/src/components/Navigation.tsx +++ b/webapp/src/components/Navigation.tsx @@ -1,10 +1,8 @@ -import React from 'react' import {Route, Switch} from 'react-router-dom'; import Checkout from '../pages/Checkout'; import NavBar from "./NavBar"; import Home from "./Home"; import LoadingSession from "./LoadingSessionComponent" -import CheckoutData from "./checkout/CheckoutDataComponent" import LogoutSession from './logout/LogoutSessionComponent'; type Props = { diff --git a/webapp/src/components/checkout/Form.tsx b/webapp/src/components/checkout/Form.tsx index 4e7062b..24da9c8 100644 --- a/webapp/src/components/checkout/Form.tsx +++ b/webapp/src/components/checkout/Form.tsx @@ -26,7 +26,7 @@ const Form = (props: Props) => { const {name, email, lastName, address, resetValues } = useForm(initialState); const [showToast, setShowToast ] = useState(false); const [contactData, setContactData] = useState(); - const [validValue, setValidValue] = useState(false); + const [, setValidValue] = useState(false); useEffect(() => { diff --git a/webapp/src/pages/Checkout.tsx b/webapp/src/pages/Checkout.tsx index 7935710..e3d9d1d 100644 --- a/webapp/src/pages/Checkout.tsx +++ b/webapp/src/pages/Checkout.tsx @@ -1,10 +1,10 @@ -import React, {useState} from 'react' +import {useState} from 'react' import { Container, Row } from 'react-bootstrap'; import Form from "../components/checkout/Form"; import OrderSummary from "../components/order/Order"; const Checkout = () => { - const [address, setAddress] = useState("") + const [, setAddress] = useState("") return ( @@ -14,7 +14,7 @@ const Checkout = () => {
- + ) diff --git a/webapp/src/pages/DetailsView/DetailsView.tsx b/webapp/src/pages/DetailsView/DetailsView.tsx index 25b7898..9f0640b 100644 --- a/webapp/src/pages/DetailsView/DetailsView.tsx +++ b/webapp/src/pages/DetailsView/DetailsView.tsx @@ -41,7 +41,7 @@ const DetailsView: React.FC = () => { } ); }, - [_id]); + [apiEndPoint, _id]); if (item) return(