show stakings on table
This commit is contained in:
@@ -15,14 +15,56 @@ export const Dashbaord: FC = () => {
|
||||
if (data?.status === "0" || !data) return null;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ul>
|
||||
<li>Ganho: {data.result.PancakeSwap.staking.totalUSDValues.yield}</li>
|
||||
<li>
|
||||
Depositado: {data.result.PancakeSwap.staking.totalUSDValues.deposit}
|
||||
</li>
|
||||
<li>Total: {data.result.PancakeSwap.staking.totalUSDValues.total}</li>
|
||||
</ul>
|
||||
<div className="grid place-items-center w-full h-5 mt-16">
|
||||
<div className="inline-block max-w-3xl shadow rounded-lg overflow-hidden">
|
||||
<table className="min-w-full leading-normal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
scope="col"
|
||||
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
|
||||
>
|
||||
Pool
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
|
||||
>
|
||||
Depositado
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
|
||||
>
|
||||
Ganho
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data.result.PancakeSwap.staking.vaults.map((vault) => {
|
||||
return (
|
||||
<tr key={vault.chainId}>
|
||||
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p className="text-gray-900 whitespace-no-wrap">
|
||||
{vault.name}
|
||||
</p>
|
||||
</td>
|
||||
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p className="text-gray-900 whitespace-no-wrap">
|
||||
{vault.depositedTokens.toFixed(4)}
|
||||
</p>
|
||||
</td>
|
||||
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p className="text-gray-900 whitespace-no-wrap">
|
||||
{vault.totalRewards.toFixed(4)}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user