import { formatEther } from "ethers";

export const Table = ({ addresses, amounts }) => {
    return (
        <table>
            <thead>
                <tr>
                    <th >Address</th>
                    <th >Amount</th>
                </tr>
            </thead>
            <tbody>
                {
                    addresses?.map((address, index) => (
                        <tr key={index}>
                            <td >{address}</td>
                            <td >{formatEther(amounts[index])}</td>
                        </tr>
                    ))
                }
            </tbody>
        </table>
    )
}


