mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: fix accounts issue.
This commit is contained in:
18
client/src/store/dashboard/dashboard.selectors.js
Normal file
18
client/src/store/dashboard/dashboard.selectors.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import { createSelector } from "@reduxjs/toolkit";
|
||||
|
||||
|
||||
const dialogByNameSelector = (state, props) => state.dashboard.dialogs[props.name];
|
||||
|
||||
export const isDialogOpen = createSelector(
|
||||
dialogByNameSelector,
|
||||
(dialog) => {
|
||||
return dialog && dialog.isOpen;
|
||||
},
|
||||
);
|
||||
|
||||
export const getDialogPayload = createSelector(
|
||||
dialogByNameSelector,
|
||||
(dialog) => {
|
||||
return dialog?.payload;
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user