From 04a9297e4ec207df878509db88a552da7bb6d3a2 Mon Sep 17 00:00:00 2001 From: chip Date: Tue, 20 Oct 2020 15:47:41 +0200 Subject: [PATCH] Moved transactions --- .../TransactionList.tsx} | 4 +-- phone/src/apps/bank/hooks/useBank.ts | 32 ------------------- 2 files changed, 2 insertions(+), 34 deletions(-) rename phone/src/apps/bank/components/{transactionList.tsx => transactions/TransactionList.tsx} (78%) delete mode 100644 phone/src/apps/bank/hooks/useBank.ts diff --git a/phone/src/apps/bank/components/transactionList.tsx b/phone/src/apps/bank/components/transactions/TransactionList.tsx similarity index 78% rename from phone/src/apps/bank/components/transactionList.tsx rename to phone/src/apps/bank/components/transactions/TransactionList.tsx index 0610fe5..233af19 100644 --- a/phone/src/apps/bank/components/transactionList.tsx +++ b/phone/src/apps/bank/components/transactions/TransactionList.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { List } from "../../../ui/components/List"; -import { ListItem } from "../../../ui/components/ListItem"; +import { List } from "../../../../ui/components/List"; +import { ListItem } from "../../../../ui/components/ListItem"; import ListItemText from "@material-ui/core/ListItemText"; export const TransactionList = ({ transactions }) => { diff --git a/phone/src/apps/bank/hooks/useBank.ts b/phone/src/apps/bank/hooks/useBank.ts deleted file mode 100644 index e4ee679..0000000 --- a/phone/src/apps/bank/hooks/useBank.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { useRecoilState, atom } from "recoil"; - -const transactionListState = atom({ - key: "transactionList", - default: [ - { - id: 0, - amount: 300, - type: "withdraw", - date: "3", - }, - { - id: 1, - amount: 1000, - type: "withdraw", - date: "3", - }, - { - id: 2, - amount: 50, - type: "transfer", - date: "2", - }, - ], -}); - -export const useBank = () => { - const [transactionList, setTransactionList] = useRecoilState( - transactionListState - ); - return { transactionList, setTransactionList }; -};