Skip to content

Commit

Permalink
Create WalletTransactions
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 24, 2024
1 parent adc24a8 commit a0adac0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/components/WalletTransactions
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { useWallet } from '../contexts/WalletContext';
import { useTheme } from '../contexts/ThemeContext';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faGear } from '@fortawesome/free-solid-svg-icons';

const WalletTransactions = () => {
const { wallet } = useWallet();
const { theme } = useTheme();

return (
<div className={`wallet-transactions ${theme}`}>
<h2>Wallet Transactions</h2>
<ul>
{wallet.transactions.map((transaction) => (
<li key={transaction.id}>
<span>{transaction.date}</span>
<span>{transaction.amount}</span>
<span>{transaction.type}</span>
</li>
))}
</ul>
</div>
);
};

export default WalletTransactions;

0 comments on commit a0adac0

Please sign in to comment.