mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Feat(PhoneApp): PhoneApp hook
This commit is contained in:
1 parent
fd2e15ef7d
commit
863f908f05
1 file changed
+25
@@ -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 };
|
||||
}
|
||||
Reference in new issue
Block a user