From ee283c8b1c01e5710ea02d1070f45609b93de150 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 7 Jan 2021 21:43:07 +0100 Subject: [PATCH] fix(bank/nui): fixed warnings --- phone/src/apps/bank/components/BankApp.tsx | 17 +++-------------- phone/src/apps/bank/components/BankTitle.tsx | 1 - .../components/account/AccountTransactions.tsx | 4 ++-- .../bank/components/account/BankAccount.tsx | 3 +-- .../components/transactions/TransactionList.tsx | 2 +- 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/phone/src/apps/bank/components/BankApp.tsx b/phone/src/apps/bank/components/BankApp.tsx index 6c02e5d..7001d3f 100644 --- a/phone/src/apps/bank/components/BankApp.tsx +++ b/phone/src/apps/bank/components/BankApp.tsx @@ -1,23 +1,17 @@ import React from 'react'; -import { makeStyles, Paper, Typography } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core'; import { BankTitle } from './BankTitle'; import { AppWrapper } from '../../../ui/components'; import { AppContent } from '../../../ui/components/AppContent'; -import { Button } from '../../../ui/components/Button'; -import { useTranslation } from 'react-i18next'; -import { useTransactions } from '../hooks/useTransactions'; import './BankApp.css'; import { TransferModal } from './transfers/TransferModal'; import { useBankModal } from '../hooks/useBankModal'; -import { useCredentials } from '../hooks/useCredentials'; import { Switch, Route } from 'react-router-dom'; - -// image -import CreditCard from '../img/credit-card.png'; import { NavigationBar } from './navigation/NavigationBar'; + import { BankHome } from './home/BankHome'; import { BankAccount } from './account/BankAccount'; import { TransactionList } from './transactions/TransactionList'; @@ -49,14 +43,9 @@ const useStyles = makeStyles((theme) => ({ })); export const BankApp = () => { - const { showBankModal, setShowBankModal } = useBankModal(); - const { t } = useTranslation(); + const { showBankModal } = useBankModal(); const classes = useStyles(); - const openTransactionsModal = () => { - setShowBankModal(true); - }; - return ( diff --git a/phone/src/apps/bank/components/BankTitle.tsx b/phone/src/apps/bank/components/BankTitle.tsx index b5751ca..11f2d23 100644 --- a/phone/src/apps/bank/components/BankTitle.tsx +++ b/phone/src/apps/bank/components/BankTitle.tsx @@ -1,7 +1,6 @@ import React from 'react'; import Paper from '@material-ui/core/Paper'; import { Typography, makeStyles } from '@material-ui/core'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import './BankApp.css'; diff --git a/phone/src/apps/bank/components/account/AccountTransactions.tsx b/phone/src/apps/bank/components/account/AccountTransactions.tsx index 1513465..0dd3742 100644 --- a/phone/src/apps/bank/components/account/AccountTransactions.tsx +++ b/phone/src/apps/bank/components/account/AccountTransactions.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { makeStyles, Paper, Typography, Button } from '@material-ui/core'; +import { Button } from '@material-ui/core'; import { useTransactions } from '../../hooks/useTransactions'; import useStyles from './account.styles'; @@ -33,7 +33,7 @@ export const AccountTransactions = (): any => {

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

diff --git a/phone/src/apps/bank/components/account/BankAccount.tsx b/phone/src/apps/bank/components/account/BankAccount.tsx index 8dae023..12328c9 100644 --- a/phone/src/apps/bank/components/account/BankAccount.tsx +++ b/phone/src/apps/bank/components/account/BankAccount.tsx @@ -1,6 +1,5 @@ import React from 'react'; -import { Button } from '../../../../ui/components/Button'; -import { makeStyles, Paper, Typography } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core'; import { useTranslation } from 'react-i18next'; import { BankCard } from './BankCard'; import { AccountTransactions } from './AccountTransactions'; diff --git a/phone/src/apps/bank/components/transactions/TransactionList.tsx b/phone/src/apps/bank/components/transactions/TransactionList.tsx index 5a3475f..fda8676 100644 --- a/phone/src/apps/bank/components/transactions/TransactionList.tsx +++ b/phone/src/apps/bank/components/transactions/TransactionList.tsx @@ -43,7 +43,7 @@ export const TransactionList = () => {

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