feat: add connect to bank dialog

This commit is contained in:
Ahmed Bouhuolia
2024-02-04 18:48:03 +02:00
parent e0ddcb022a
commit 299a943153
15 changed files with 214 additions and 24 deletions

View File

@@ -0,0 +1,20 @@
import { getPlaidToken, setPlaidId } from '@/store/banking/banking.reducer';
import { useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
export const useSetBankingPlaidToken = () => {
const dispatch = useDispatch();
return useCallback(
(plaidId: string) => {
dispatch(setPlaidId(plaidId));
},
[dispatch],
);
};
export const useGetBankingPlaidToken = () => {
const plaidToken = useSelector(getPlaidToken);
return plaidToken;
};