Skip to content

Commit

Permalink
Get defaultBoardBlackList from active communicator
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Jul 23, 2024
1 parent 3794cbd commit 43da260
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/Communicator/Communicator.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,14 @@ export function getApiMyCommunicators() {
} catch (e) {
console.error(e);
}
const activeCommunicator =
res.data.find(
communicator =>
communicator.id === getState().communicator.activeCommunicator
) ?? res.data[res.data.length - 1];
const defaultBoardBlackList = activeCommunicator?.defaultBoardBlackList;
const getActiveCommunicator = getState => {
return getState().communicator.communicators.find(
c => c.id === getState().communicator.activeCommunicatorId
);
};
const activeCommunicator = getActiveCommunicator(getState);
const defaultBoardBlackList =
activeCommunicator?.defaultBoardBlackList ?? [];
dispatch(
removeBoardsFromList(
defaultBoardBlackList,
Expand Down

0 comments on commit 43da260

Please sign in to comment.