Merge pull request #1829 from OHIF/feat/ohif-165-fix

OHIF-165: Fix broken solution after recent merge
This commit is contained in:
Danny Brown 2020-06-29 15:17:44 -04:00 committed by GitHub
commit 4c7e3f95fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,6 @@ import {
useViewportGrid,
} from '@ohif/ui';
const DEFAULT_LAYOUT = {
type: 'SET_LAYOUT',
payload: {
numCols: 1,
numRows: 1,
},
};
function LayoutSelector() {
const [isOpen, setIsOpen] = useState(false);
const [viewportGridState, viewportGridService] = useViewportGrid();
@ -33,7 +25,7 @@ function LayoutSelector() {
useEffect(() => {
/* Reset to default layout when component unmounts */
return () => {
dispatch(DEFAULT_LAYOUT);
viewportGridService.setLayout({ numCols: 1, numRows: 1 });
};
}, []);