mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat( contact duplicate): contact duplicate dialog.
This commit is contained in:
14
client/src/hooks/query/contacts.js
Normal file
14
client/src/hooks/query/contacts.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useQuery } from 'react-query';
|
||||
import useApiRequest from '../useRequest';
|
||||
|
||||
/**
|
||||
* Retrieve the contact duplicate.
|
||||
*/
|
||||
export function useContact(id, props) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useQuery(['CONTACT', id], () => apiRequest.get(`contacts/${id}`), {
|
||||
select: (res) => res.data.customer,
|
||||
...props,
|
||||
});
|
||||
}
|
||||
@@ -20,3 +20,4 @@ export * from './settings';
|
||||
export * from './users';
|
||||
export * from './invite';
|
||||
export * from './exchangeRates';
|
||||
export * from './contacts';
|
||||
|
||||
Reference in New Issue
Block a user