Skip to content

Commit 5552ca2

Browse files
author
John Rogers
committed
Fixed linting errors preventing build
1 parent e196a0c commit 5552ca2

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

src/components/App.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import React, { useState, useEffect, useMemo, useCallback } from "react";
2-
import {
3-
Container,
4-
Box,
5-
Slide,
6-
useMediaQuery,
7-
Link,
8-
Typography,
9-
Rating,
10-
} from "@mui/material";
2+
import { Box, useMediaQuery, Typography, Rating } from "@mui/material";
113
import { HashRouter as Router, Switch, Route } from "react-router-dom";
124
import Upload from "./Upload";
135
import Results from "./Results";
@@ -22,8 +14,6 @@ import {
2214
import { simplifyApi } from "../utilities/simplifyApi";
2315
import HarmonySidebar from "./HarmonySidebar";
2416
import pattern from "../img/pattern.svg";
25-
import logoWithText from "../img/Logo-04-min.svg";
26-
import ResultsOptions from "./ResultsOptions";
2717
import { deepmerge } from "@mui/utils";
2818
import { ColorModeContext } from "../contexts/ColorModeContext";
2919
import { useData } from "../contexts/DataContext";
@@ -33,7 +23,6 @@ import CookieConsent, { getCookieConsentValue } from "react-cookie-consent";
3323
import { ToastContainer, toast } from "react-toastify";
3424
import MakeMeJSON from "./MakeMeJSON.js";
3525
import "react-toastify/dist/ReactToastify.css";
36-
import YouTube from "react-youtube";
3726
import "../css/youtube.css";
3827

3928
function App() {

src/components/HarmonySidebar.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useState } from "react";
22
import {
33
Box,
4-
List,
54
ListItem,
65
ListItemButton,
76
ListItemIcon,
@@ -107,7 +106,6 @@ export default function HarmonySidebar() {
107106
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
108107
const [anchorUser, setAnchorUser] = useState(null);
109108
const [apiVersion, setApiVersion] = useState(null);
110-
const [error, setError] = useState(null);
111109

112110
const {
113111
currentUser,
@@ -155,7 +153,7 @@ export default function HarmonySidebar() {
155153
.then((ver) => {
156154
setApiVersion(ver);
157155
})
158-
.catch((e) => setError("ERROR: API unreachable"));
156+
.catch((e) => console.error("ERROR: API unreachable", e));
159157
}, [getVersion]);
160158

161159
return (

src/components/Results.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default function Results({
9393
};
9494

9595
useEffect(() => {
96-
if (Object.keys(apiData).length === 0 && stateHash) {
96+
if (stateHash) {
9797
getPublicHarmonisations(stateHash)
9898
.then((data) => {
9999
if (Array.isArray(data.apiData)) {

0 commit comments

Comments
 (0)