7514066fc3
* move settings * remove meteor cache files
25 lines
694 B
TypeScript
25 lines
694 B
TypeScript
import { ACTIONS, PANELS } from '/imports/ui/components/layout/enums';
|
|
import { isSharedNotesEnabled } from '/imports/ui/services/features';
|
|
|
|
const isEnabled = () => isSharedNotesEnabled();
|
|
|
|
// @ts-ignore Until everything in Typescript
|
|
const toggleNotesPanel = (sidebarContentPanel, layoutContextDispatch) => {
|
|
layoutContextDispatch({
|
|
type: ACTIONS.SET_SIDEBAR_CONTENT_IS_OPEN,
|
|
value: sidebarContentPanel !== PANELS.SHARED_NOTES,
|
|
});
|
|
layoutContextDispatch({
|
|
type: ACTIONS.SET_SIDEBAR_CONTENT_PANEL,
|
|
value:
|
|
sidebarContentPanel === PANELS.SHARED_NOTES
|
|
? PANELS.NONE
|
|
: PANELS.SHARED_NOTES,
|
|
});
|
|
};
|
|
|
|
export default {
|
|
toggleNotesPanel,
|
|
isEnabled,
|
|
};
|