fix(router): Expose the react router from the worklist too. (#5062)
This commit is contained in:
1 parent
c2cc0832f3
commit
14f5f0c074
12 files changed
+101
-95
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import { useParams, useLocation, useNavigate } from 'react-router';
|
||||
import { useParams, useLocation } from 'react-router';
|
||||
import PropTypes from 'prop-types';
|
||||
import { utils } from '@ohif/core';
|
||||
import { ImageViewerProvider, DragAndDropProvider } from '@ohif/ui-next';
|
||||
@@ -7,7 +7,6 @@ import { useSearchParams } from '../../hooks';
|
||||
import { useAppConfig } from '@state';
|
||||
import ViewportGrid from '@components/ViewportGrid';
|
||||
import Compose from './Compose';
|
||||
import { history } from '../../utils/history';
|
||||
import loadModules from '../../pluginImports';
|
||||
import { defaultRouteInit } from './defaultRouteInit';
|
||||
import { updateAuthServiceAndCleanUrl } from './updateAuthServiceAndCleanUrl';
|
||||
@@ -52,9 +51,6 @@ export default function ModeRoute({
|
||||
const locationRef = useRef(null);
|
||||
const isMounted = useRef(false);
|
||||
|
||||
// Expose the react router dom navigation.
|
||||
history.navigate = useNavigate();
|
||||
|
||||
if (location !== locationRef.current) {
|
||||
layoutTemplateData.current = null;
|
||||
locationRef.current = location;
|
||||
|
||||
Reference in new issue
Block a user