mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 06:28:51 +00:00
feat(contacts/nui): new state for contact details
This commit is contained in:
1 parent
c77a9fc807
commit
de09800a72
2 files changed
+11
No files matched your search
@@ -16,5 +16,9 @@ export const contactsState = {
|
||||
showContactsModal: atom({
|
||||
key: 'showContactModal',
|
||||
default: false
|
||||
}),
|
||||
contactDetail: atom({
|
||||
key: 'contactDetail',
|
||||
default: null
|
||||
})
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { contactsState } from './state';
|
||||
|
||||
export const useContactDetail = (): any => {
|
||||
const [ contactDetail, setContactDetail ] = useRecoilState(contactsState.contactDetail);
|
||||
return { contactDetail, setContactDetail };
|
||||
}
|
||||
Reference in new issue
Block a user