mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: reset plaid lanch link token
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import { getPlaidToken, setPlaidId } from '@/store/banking/banking.reducer';
|
||||
import {
|
||||
getPlaidToken,
|
||||
setPlaidId,
|
||||
resetPlaidId,
|
||||
} from '@/store/banking/banking.reducer';
|
||||
import { useCallback } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
|
||||
@@ -18,3 +22,11 @@ export const useGetBankingPlaidToken = () => {
|
||||
|
||||
return plaidToken;
|
||||
};
|
||||
|
||||
export const useResetBankingPlaidToken = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return useCallback(() => {
|
||||
dispatch(resetPlaidId());
|
||||
}, [dispatch]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user