feat: reset plaid lanch link token

This commit is contained in:
Ahmed Bouhuolia
2024-02-04 19:59:04 +02:00
parent 299a943153
commit 6d888060d3
5 changed files with 73 additions and 59 deletions

View File

@@ -13,8 +13,11 @@ export const PlaidSlice = createSlice({
setPlaidId: (state: StorePlaidState, action: PayloadAction<string>) => {
state.plaidToken = action.payload;
},
resetPlaidId: (state: StorePlaidState) => {
state.plaidToken = '';
}
},
});
export const { setPlaidId } = PlaidSlice.actions;
export const getPlaidToken = (state: any) => state.plaid.plaidToken;
export const { setPlaidId, resetPlaidId } = PlaidSlice.actions;
export const getPlaidToken = (state: any) => state.plaid.plaidToken;