@material-ui/icons#CallMade TypeScript Examples

The following examples show how to use @material-ui/icons#CallMade. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransactionHistoryList.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
function TransactionHistoryListBase({
  className,
  history,
  breakpoint = 700,
}: TransactionHistoryListProps) {
  const { ref, width = 1000 } = useResizeObserver();
  const { network } = useNetwork();

  return (
    <ul className={className} ref={ref} data-break={width < breakpoint}>
      {history.map(({ descriptions, timestamp, tx_hash, tx_type }, i) => {
        const datetime = new Date(timestamp);
        return (
          <li key={'txhistory' + tx_hash + '_' + i}>
            <a
              href={getTransactionDetailUrl(network.chainID, tx_hash)}
              target="_blank"
              rel="noreferrer"
            >
              <div>
                <p>{tx_type}</p>
                <p>
                  <span
                    dangerouslySetInnerHTML={{
                      __html: descriptions.join('<br/>'),
                    }}
                  />
                  <CallMade style={{ marginLeft: '0.5em' }} />
                </p>
              </div>
              <time>
                {datetime.toLocaleDateString('en-US', {
                  weekday: 'short',
                  year: 'numeric',
                  month: 'short',
                  day: 'numeric',
                })}
                {', '}
                <span className="time">
                  {datetime.toLocaleTimeString('en-US')}
                </span>
              </time>
            </a>
          </li>
        );
      })}
    </ul>
  );
}