mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: add connect to bank dialog
This commit is contained in:
@@ -5,7 +5,7 @@ import useApiRequest from '../useRequest';
|
||||
/**
|
||||
* Retrieves the plaid link token.
|
||||
*/
|
||||
export function useGetPlaidLinkToken(props) {
|
||||
export function useGetPlaidLinkToken(props = {}) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
@@ -15,3 +15,17 @@ export function useGetPlaidLinkToken(props) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the plaid link token.
|
||||
*/
|
||||
export function usePlaidExchangeToken(props = {}) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
(data) => apiRequest.post('banking/plaid/exchange-token', data, {}),
|
||||
{
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user