mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
25 lines
537 B
JavaScript
25 lines
537 B
JavaScript
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 };
|
|
} |