From 2fd288af36ac71618995dd0288321e74130e41e4 Mon Sep 17 00:00:00 2001 From: ozfox Date: Tue, 25 Jun 2024 10:20:58 +0200 Subject: [PATCH 1/5] frontend: fix build errors --- frontend/package-lock.json | 14 +++++ frontend/src/App.tsx | 7 --- frontend/src/Components/Footer.tsx | 2 - frontend/src/Components/Friends.tsx | 2 - frontend/src/Components/Inventory.tsx | 2 - frontend/src/Components/Navbar/Navbar.tsx | 5 +- frontend/src/Components/PetPage.tsx | 4 +- frontend/src/Components/Settings.tsx | 8 +-- frontend/src/Posts.tsx | 64 +++++++++++------------ frontend/src/Profile.tsx | 20 +++---- 10 files changed, 63 insertions(+), 65 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 2d27c99c..415b2faf 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,6 +11,7 @@ "bootstrap": "^5.3.3", "bootstrap-icons": "^1.11.3", "oidc-client-ts": "^3.0.1", + "openapi-fetch": "^0.10.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-oidc-context": "^3.1.0", @@ -2365,6 +2366,19 @@ "wrappy": "1" } }, + "node_modules/openapi-fetch": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.10.2.tgz", + "integrity": "sha512-GCzgKIZchnxZRnztiOlRTKk9tQT0NHvs5MNXYFtOwG7xaj1iCJOGDsTLbn/2QUP37PjGTT890qERFjvmjxzQMg==", + "dependencies": { + "openapi-typescript-helpers": "^0.0.9" + } + }, + "node_modules/openapi-typescript-helpers": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.9.tgz", + "integrity": "sha512-BO2TvIDAO/FPVKz1Nj2gy+pUOHfaoENdK5UP3H0Jbh0VXBf3dwYMs58ZwOjiezrbHA2LamdquoyQgahTPvIxGA==" + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8212a856..0d080c05 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,19 +1,12 @@ -import React from "react"; import { useAuth } from "react-oidc-context"; -import { useState } from "react"; import "./App.css"; -import LinkDevice from "./Components/LinkDevice"; import Footer from "./Components/Footer"; import Navbar from "./Components/Navbar/Navbar"; -import Settings from "./Components/Settings"; -import CreatePetModal from "./Components/CreatePetModal"; -import PetPage from "./Components/PetPage"; import type { paths } from "./web-backend-api"; import createClient, { type Middleware } from "openapi-fetch"; function App() { const auth = useAuth(); - const [count, setCount] = useState(0); switch (auth.activeNavigator) { case "signinSilent": diff --git a/frontend/src/Components/Footer.tsx b/frontend/src/Components/Footer.tsx index 2baf73a3..c00aefc2 100644 --- a/frontend/src/Components/Footer.tsx +++ b/frontend/src/Components/Footer.tsx @@ -1,5 +1,3 @@ -import React from "react"; - const Footer = () => (