mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
I really hope I didnt fuck anything up now
This commit is contained in:
1 parent
ad20755608
commit
ec37fcde46
67 files changed
No files matched your search
@@ -0,0 +1,31 @@
|
||||
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 };
|
||||
}
|
||||
Reference in new issue
Block a user