fix eslint and types

This commit is contained in:
João Geonizeli
2021-08-15 12:51:09 -03:00
parent 890fbddd82
commit 3c3d2862d3
22 changed files with 255 additions and 71 deletions

View File

@@ -1,5 +1,4 @@
import React from "react";
import BigNumber from "bignumber.js";
import type { PoolConfig } from "../types";
import { useBsc } from "../contexts/BscProvider";
@@ -32,6 +31,7 @@ export const Pool = ({ pool }: PoolProps) => {
const totalStaked = await getTotalStaked(provider, pool);
// eslint-disable-next-line no-console
console.log(
`Total Staked for ${pool.stakingToken.symbol} - ${
pool.earningToken.symbol
@@ -52,7 +52,7 @@ export const Pool = ({ pool }: PoolProps) => {
});
}
})();
}, []);
}, [pool, provider, router]);
return (
<div
@@ -95,4 +95,4 @@ export const Pool = ({ pool }: PoolProps) => {
</div>
</div>
);
};
};

View File

@@ -9,7 +9,9 @@ export const PoolListing = () => {
{pools
.filter((pool) => !pool.isFinished)
.sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0))
.map((pool) => <Pool key={pool.sousId} pool={pool} />)}
.map((pool) => (
<Pool key={pool.sousId} pool={pool} />
))}
</div>
);
};