From e5f03ca97f7379f14273b53d00c8f65ac56b61cc Mon Sep 17 00:00:00 2001 From: John Rogers Date: Thu, 3 Jul 2025 12:31:13 +0100 Subject: [PATCH] tweaks to allow build to complete without linter warnings about caniuse and unused methods --- package-lock.json | 6 +++--- src/components/App.js | 19 ++++++++----------- src/components/AppBar.js | 6 +++--- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index e9c949a..d342bf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7234,9 +7234,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", + "version": "1.0.30001726", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001726.tgz", + "integrity": "sha512-VQAUIUzBiZ/UnlM28fSp2CRF3ivUn1BWEvxMcVTNwpw91Py1pGbPIyIKtd+tzct9C3ouceCVdGAXxZOpZAsgdw==", "funding": [ { "type": "opencollective", diff --git a/src/components/App.js b/src/components/App.js index dd3561d..ffe6735 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -35,10 +35,7 @@ import MakeMeJSON from "./MakeMeJSON.js"; import "react-toastify/dist/ReactToastify.css"; import YouTube from "react-youtube"; import "../css/youtube.css"; -import { useHistory } from "react-router-dom"; - function App() { - const history = useHistory(); const [fullscreen, setFullscreen] = useState(false); const [existingInstruments, setExistingInstruments] = useState([]); const [apiData, setApiData] = useState({}); @@ -154,20 +151,20 @@ function App() { if (fileInfos) return match(fileInfos, forceModel).then((data) => { let simpleApi = simplifyApi(data, fileInfos); - + // Filter existing computedMatches to remove any references to removed instruments - setComputedMatches(prev => { + setComputedMatches((prev) => { if (!prev) return prev; const validQuestionIndices = new Set( - fileInfos.flatMap((f, i) => - f.questions.map((_, qIdx) => qIdx) - ) + fileInfos.flatMap((f, i) => f.questions.map((_, qIdx) => qIdx)) ); - return prev.filter(match => - validQuestionIndices.has(match.qi) && validQuestionIndices.has(match.mqi) + return prev.filter( + (match) => + validQuestionIndices.has(match.qi) && + validQuestionIndices.has(match.mqi) ); }); - + setApiData(simpleApi); }); }, diff --git a/src/components/AppBar.js b/src/components/AppBar.js index ace6372..396ad08 100644 --- a/src/components/AppBar.js +++ b/src/components/AppBar.js @@ -84,9 +84,9 @@ function HarmonyAppBar() { } }; - const handleLanguageMenuClick = (menuItem) => { - console.log(menuItem); - }; + // const handleLanguageMenuClick = (menuItem) => { + // console.log(menuItem); + // }; const handleCloseUserMenu = () => { setAnchorUser(null);