import React from "react"; import { Account, useFetchAccountInfo } from "providers/accounts"; import { TableCardBody } from "components/common/TableCardBody"; import { Address } from "components/common/Address"; import { VoteAccount } from "validators/accounts/vote"; import { displayTimestamp } from "utils/date"; import { AccountHeader, AccountAddressRow, AccountBalanceRow, } from "components/common/Account"; import { Slot } from "components/common/Slot"; export function VoteAccountSection({ account, voteAccount, }: { account: Account; voteAccount: VoteAccount; }) { const refresh = useFetchAccountInfo(); const rootSlot = voteAccount.info.rootSlot; return (
refresh(account.pubkey, "parsed")} /> Authorized Voter {voteAccount.info.authorizedVoters.length > 1 ? "s" : ""} {voteAccount.info.authorizedVoters.map((voter) => { return (
); })} Authorized Withdrawer
Last Timestamp {displayTimestamp(voteAccount.info.lastTimestamp.timestamp * 1000)} Commission {voteAccount.info.commission + "%"} Root Slot {rootSlot !== null ? : "N/A"}
); }