Skip to content

Commit

Permalink
Fixed lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sallaa committed Sep 10, 2024
1 parent 8ec464f commit be6d199
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Hooks/useInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ export const useLoading = (action) => {
export const loadImageSize = (resultData, cols) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
let height = 0;
let colsWidth = 1180 / cols;
if (Array.isArray(resultData) && resultData.length) {
let img = new Image();
img.src = resultData[0];
height = (colsWidth * img.height) / img.width;
const height = (colsWidth * img.height) / img.width;
if (img.width !== 0 && img.height !== 0) {
resolve(height);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ const DeepfakeResultsVideo = (props) => {
);
}

setDeepfakeScores(res);

res = res.sort((a, b) => b.predictionScore - a.predictionScore);

setDeepfakeScores(res);
}, [results]);

//console.log("Rectangles: ", rectangles);
Expand Down Expand Up @@ -326,7 +326,7 @@ const DeepfakeResultsVideo = (props) => {
{keyword("deepfake_no_face_detection")}
</Typography>
)}
{deepfakeScores && deepfakeScores.length != 0 && (
{deepfakeScores && deepfakeScores.length !== 0 && (
<GaugeChartResult
keyword={keyword}
scores={deepfakeScores}
Expand Down

0 comments on commit be6d199

Please sign in to comment.