Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 8 additions & 11 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
Expand Down Expand Up @@ -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);
});
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ function HarmonyAppBar() {
}
};

const handleLanguageMenuClick = (menuItem) => {
console.log(menuItem);
};
// const handleLanguageMenuClick = (menuItem) => {
// console.log(menuItem);
// };

const handleCloseUserMenu = () => {
setAnchorUser(null);
Expand Down