Skip to content

Commit

Permalink
Removed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
omerpa committed Jan 22, 2024
1 parent c2bf2da commit e736e3b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
5 changes: 0 additions & 5 deletions src/setupTests.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/ui/BackToTop/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect} from 'react';
import React from 'react';

import {UseShowOnScrollTo} from "../hooks/userShowOnScrollTo";

Expand Down
4 changes: 2 additions & 2 deletions src/ui/DataGrid/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect, useRef} from 'react';
import React, {useState, useRef} from 'react';

import "./css/index.scss";
import {AlignType, ColumnType, numberWithCommas} from "./types";
Expand Down Expand Up @@ -67,7 +67,7 @@ const DataGrid = ({headers, data, numRecords, initialViewSize, endlessView}) =>

const getAlignment = header => {

let retAlign = "";
let retAlign;

switch (header.alignment) {
case AlignType.right:
Expand Down
3 changes: 0 additions & 3 deletions src/ui/DataGrid/server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {sortData} from "./sortUtil";

const Server = {

demoData : [],
Expand All @@ -26,7 +24,6 @@ const Server = {

const partialView = Server.demoData.slice(startPos, startPos + numRecords);

const sortedData = sortData(partialView,0, false)
return {
records : partialView,
numRecords: NumRecords
Expand Down
13 changes: 5 additions & 8 deletions src/ui/DataGrid/sortUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ const compareDates = (d1, d2) => {
};

const compareDebtTypes = (itemA, itemB) => {
/*
const DebtType = {
Traffic: 0,
Legal: 1,
Tax: 2,
}
*/

const debtType1 = itemA[sortBy];
const debtType2 = itemB[sortBy];

Expand All @@ -52,14 +46,17 @@ const compareDebtTypes = (itemA, itemB) => {
compareRes = flipSort ? 1 : -1;
}
break;

default:
console.warn("Debt type not found");
}
}

return compareRes;
};

const sortFunc = (itemA, itemB) => {
let compareRes = 0;
let compareRes;
if (compareByFunc) {
compareRes = compareByFunc(itemA, itemB);
} else {
Expand Down

0 comments on commit e736e3b

Please sign in to comment.