feat(studies-panel): New OHIF study panel - under experimental flag (#4254)
This commit is contained in:
1 parent
4432b6b420
commit
7a96406a11
80 files changed
+4119
-253
No files matched your search
@@ -1,5 +1,7 @@
|
||||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { SidePanel } from '@ohif/ui';
|
||||
import { SidePanel as NewSidePanel } from '@ohif/ui-next';
|
||||
import { SidePanel as OldSidePanel } from '@ohif/ui';
|
||||
import { useAppConfig } from '@state';
|
||||
import { Types } from '@ohif/core';
|
||||
|
||||
export type SidePanelWithServicesProps = {
|
||||
@@ -26,6 +28,7 @@ const SidePanelWithServices = ({
|
||||
const [hasBeenOpened, setHasBeenOpened] = useState(false);
|
||||
const [activeTabIndex, setActiveTabIndex] = useState(activeTabIndexProp);
|
||||
const [tabs, setTabs] = useState(tabsProp ?? panelService.getPanels(side));
|
||||
const [appConfig] = useAppConfig();
|
||||
|
||||
const handleSidePanelOpen = useCallback(() => {
|
||||
setHasBeenOpened(true);
|
||||
@@ -75,6 +78,8 @@ const SidePanelWithServices = ({
|
||||
};
|
||||
}, [tabs, hasBeenOpened, panelService]);
|
||||
|
||||
const SidePanel = appConfig?.useExperimentalUI ? NewSidePanel : OldSidePanel;
|
||||
|
||||
return (
|
||||
<SidePanel
|
||||
{...props}
|
||||
|
||||
Reference in new issue
Block a user