Feat(PhoneApp): PhoneApp hook

This commit is contained in:
chip committed 2020-08-23 01:27:59 +02:00
1 parent fd2e15ef7d
commit 863f908f05
1 file changed
+25
+25
View File
@@ -0,0 +1,25 @@
import { useRecoilState, atom } from 'recoil';
const callListState = atom({
key: 'callList',
default: [
{
id: 0,
caller: 'Kidz',
phoneNumber: "000-1111",
type: 'incoming'
},
{
id: 1,
caller: 'ROCKY',
phoneNumber: '000-1112',
type: 'outgoing'
},
],
});
export const useCalls = () => {
const [callList, setCallList] = useRecoilState
(callListState);
return { callList, setCallList };
}