import React, { useState } from "react"; import { Amount } from "./Amount"; import { Address } from "@scaffold-ui/components"; import { Address as AddressType, formatEther } from "viem"; export type Winner = { address: AddressType; amount: bigint; }; export type WinnerEventsProps = { winners: Winner[]; }; export const WinnerEvents = ({ winners }: WinnerEventsProps) => { const [showUsdPrice, setShowUsdPrice] = useState(true); return (

Winner Events

{winners.map(({ address, amount }, i) => ( ))}
Address { setShowUsdPrice(!showUsdPrice); }} > Won
{ setShowUsdPrice(!showUsdPrice); }} >
); };