All files / extensions/default/src/customizations hideHeaderUndoRedoCustomization.ts

0% Statements 0/1
100% Branches 0/0
0% Functions 0/1
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                                             
import HeaderUndoRedo from '../ViewerLayout/HeaderUndoRedo';
 
/**
 * Opt-in customization that drops the undo/redo buttons from the right side of
 * the viewer header's menu bar, leaving every other item there (patient info,
 * plus anything a site added) untouched. Add it to the app config:
 *
 * ```js
 * window.config = {
 *   customizationService: ['@ohif/extension-default.customizationModule.hideHeaderUndoRedo'],
 * };
 * ```
 *
 * `$filter` keeps the items its predicate returns true for, so this removes one
 * entry from the shipped `ohif.headerRightSide` list rather than replacing the
 * list — a site that added its own items keeps them.
 */
export default {
  'ohif.headerRightSide': {
    items: { $filter: (item: unknown) => item !== HeaderUndoRedo },
  },
};