Skip to content

Commit

Permalink
fix: ts warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
damnnou committed Mar 13, 2024
1 parent ab8110a commit ff53840
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/common/Table/dataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ const DataTable = <TData, TValue>({
},
});

const farmingPositions = data.filter((pos) => pos.inFarming);
const farmingPositions = data.filter((pos: any) => pos.inFarming);

const zeroLiquidityPositions = data.filter((pos) => pos.liquidityUSD === 0);
const zeroLiquidityPositions = data.filter(
(pos: any) => pos.liquidityUSD === 0
);

function renderFarmingPositions() {
if (farmingPositions.length === 0) return null;
let firstMatchFound = false;

return table.getRowModel().rows.map((row) => {
return table.getRowModel().rows.map((row: any) => {
const isSelected = Number(selectedRow) === Number(row.original.id);
if (row.original.inFarming) {
const renderIndex = firstMatchFound ? null : (
Expand Down Expand Up @@ -131,7 +133,7 @@ const DataTable = <TData, TValue>({
if (zeroLiquidityPositions.length === 0) return null;
let firstMatchFound = false;

return table.getRowModel().rows.map((row) => {
return table.getRowModel().rows.map((row: any) => {
const isSelected = Number(selectedRow) === Number(row.original.id);
if (row.original.liquidityUSD === 0) {
const renderIndex = firstMatchFound ? null : (
Expand Down

0 comments on commit ff53840

Please sign in to comment.