import React from "react"; import { useTranslation } from "react-i18next"; import { makeStyles, Paper, Typography, Button } from "@material-ui/core"; import { useTransactions } from "../../hooks/useTransactions"; import { red } from "@material-ui/core/colors"; const useStyles = makeStyles((theme) => ({ root: { width: "100%", }, header: { width: "90%", display: "flex", justifyItems: "center", justifyContent: "space-between", margin: "auto", }, title: { padding: 7, borderRadius: "10px", display: "flex", justifyItems: "center", justifyContent: "center", fontSize: "24px", }, seeAll: { fontFamily: "Bahnschrift Regular", fontWeight: "bold", height: 'auto' }, transcationDiv: { marginTop: '-30px', }, transactions: { marginLeft: "32px", display: "flex", justifyContent: "space-between", borderBottom: "2px solid #707070", width: "85%", margin: "auto", }, tranSource: { fontSize: "22px", }, tranType: { fontSize: "18px", fontWeight: "bold", color: "#BFBFBF", marginTop: "-18px", width: "100%", }, depositType: { color: "#55B452", marginRight: "32px", fontSize: "22px", fontWeight: "bold", }, withdrawType: { color: "#FF5E5E", marginRight: "32px", fontSize: "22px", fontWeight: "bold", }, })); export const AccountTransactions = (): any => { const classes = useStyles(); const TransactionTypes = { Deposit: classes.depositType, Withdraw: classes.withdrawType, Transfer: classes.depositType }; const { transactionList } = useTransactions(); const { t } = useTranslation(); return (

{t("APPS_BANK_ACCOUNT_TRANSACTIONS")}

{transactionList.slice(0, 3).map((transaction: any) => (

{transaction.source}

{transaction.type}

{transaction.type == "Withdraw" ? "-" : "+"} {transaction.amount}

))}
); };