Small notes and typdef
This commit is contained in:
parent
3880b874ab
commit
7bcfaf02c0
@ -1,6 +1,11 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
/**
|
||||
* Nests React components as ordered in array. We use this to
|
||||
* simplify composition a Mode specify's in it's configuration
|
||||
* for React Contexts that should wrap a Mode Route.
|
||||
*/
|
||||
export default function Compose(props) {
|
||||
const { components = [], children } = props;
|
||||
|
||||
|
||||
@ -1,18 +1,13 @@
|
||||
import React, { useEffect, useCallback } from 'react';
|
||||
import {
|
||||
displaySetManager,
|
||||
ToolBarManager,
|
||||
useViewModel,
|
||||
useToolbarLayout,
|
||||
ToolbarLayoutProvider,
|
||||
} from '@ohif/core';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
//
|
||||
import { ToolbarLayoutProvider } from '@ohif/core';
|
||||
import { DragAndDropProvider } from '@ohif/ui';
|
||||
//
|
||||
import ViewportGrid from '@components/ViewportGrid';
|
||||
import Compose from './Compose';
|
||||
import DisplaySetCreator from './DisplaySetCreator';
|
||||
|
||||
|
||||
export default function ModeRoute({
|
||||
location,
|
||||
mode,
|
||||
@ -85,3 +80,17 @@ export default function ModeRoute({
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
ModeRoute.propTypes = {
|
||||
// Ref: https://reacttraining.com/react-router/web/api/location
|
||||
location: PropTypes.shape({
|
||||
key: PropTypes.string,
|
||||
pathname: PropTypes.string.isRequired,
|
||||
search: PropTypes.string.isRequired,
|
||||
hash: PropTypes.string.isRequired,
|
||||
state: PropTypes.object.isRequired,
|
||||
}),
|
||||
mode: PropTypes.object.isRequired,
|
||||
dataSourceName: PropTypes.string,
|
||||
extensionManager: PropTypes.object,
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user