mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: add connect to bank dialog
This commit is contained in:
20
packages/webapp/src/store/banking/banking.reducer.ts
Normal file
20
packages/webapp/src/store/banking/banking.reducer.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { PayloadAction, createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
interface StorePlaidState {
|
||||
plaidToken: string;
|
||||
}
|
||||
|
||||
export const PlaidSlice = createSlice({
|
||||
name: 'plaid',
|
||||
initialState: {
|
||||
plaidToken: '',
|
||||
} as StorePlaidState,
|
||||
reducers: {
|
||||
setPlaidId: (state: StorePlaidState, action: PayloadAction<string>) => {
|
||||
state.plaidToken = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setPlaidId } = PlaidSlice.actions;
|
||||
export const getPlaidToken = (state: any) => state.plaid.plaidToken;
|
||||
Reference in New Issue
Block a user