Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed warnings in react ui so it can compile #51

Merged
merged 1 commit into from
Mar 24, 2023
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
2 changes: 1 addition & 1 deletion skyline-vscode/react-ui/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function App() {
const [analysisState, setAnalysisState] = useState();
const [textChanged, setTextChanged] = useState(false);
const [timeBreakDown, setTimeBreakdown] = useState([]);

// eslint-disable-next-line
const [vscodeApi, setVscodeApi] = useState(acquireApi());
const [errorText, setErrorText] = useState();
const [connectionStatus, setConnectionStatus] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-anonymous-default-export
export default {
NONE: 'none',
INCREASING: 'increasing',
Expand Down
1 change: 1 addition & 0 deletions skyline-vscode/react-ui/src/components/ScatterGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const HabitatScatterGraph = ({ habitatData, height }) => {
};

const renderCustomizedLabel = (props) => {
// eslint-disable-next-line no-unused-vars
const { x, y, width, height, value } = props;
const y_offset = 5;
return (
Expand Down
1 change: 1 addition & 0 deletions skyline-vscode/react-ui/src/components/StackedBarGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from "recharts";

const renderCustomizedLabel = (props) => {
// eslint-disable-next-line no-unused-vars
const { x, y, width, height, value } = props;
const Y_OFFSET = 10;

Expand Down
8 changes: 4 additions & 4 deletions skyline-vscode/react-ui/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function toReadableByteSize(sizeBytes) {
}
size /= 1024;
}
if (index == BYTE_UNITS.length) {
if (index === BYTE_UNITS.length) {
index--;
}

Expand Down Expand Up @@ -139,11 +139,11 @@ export function getTraceByLevel(tree) {
tree[0]["depth"] = 0;
tree_size(0);

let coarseDecomposition = tree.filter(node => { return node["depth"] == 1; });
let coarseDecomposition = tree.filter(node => { return node["depth"] === 1; });
for (let fineLevel = 1; ; fineLevel ++) {
let fineDecomposition = tree.filter(node => { return node["depth"] == fineLevel; });
let fineDecomposition = tree.filter(node => { return node["depth"] === fineLevel; });
console.log(`fineLevel: ${fineLevel}, length: ${fineDecomposition.length}`);
if (fineDecomposition.length == 0) return { coarse: coarseDecomposition, fine: coarseDecomposition };
if (fineDecomposition.length === 0) return { coarse: coarseDecomposition, fine: coarseDecomposition };
if (fineDecomposition.length >= 7) return { coarse: coarseDecomposition, fine: fineDecomposition };
}
}
Expand Down