working typescript version

This commit is contained in:
erik-sn committed 2020-10-07 12:19:55 -04:00
1 parent 581d6011e0
commit cff746aa38
119 files changed
+247 -189

No files matched your search

-31
View File
@@ -1,31 +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 };
}
+32
View File
@@ -0,0 +1,32 @@
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 };
};