fix(NotFoundStudy): Fixed the viewer not-found page when showStudyList: false (#5035)
This commit is contained in:
parent
f4ba9b3cc6
commit
950453fd70
@ -12,6 +12,7 @@ import buildModeRoutes from './buildModeRoutes';
|
|||||||
import PrivateRoute from './PrivateRoute';
|
import PrivateRoute from './PrivateRoute';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { routerBase, routerBasename } from '../utils/publicUrl';
|
import { routerBase, routerBasename } from '../utils/publicUrl';
|
||||||
|
import { useAppConfig } from '@state';
|
||||||
|
|
||||||
const NotFoundServer = ({
|
const NotFoundServer = ({
|
||||||
message = 'Unable to query for studies at this time. Check your data source configuration or network connection',
|
message = 'Unable to query for studies at this time. Check your data source configuration or network connection',
|
||||||
@ -30,19 +31,20 @@ NotFoundServer.propTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const NotFoundStudy = () => {
|
const NotFoundStudy = () => {
|
||||||
|
const [appConfig] = useAppConfig();
|
||||||
|
const { showStudyList } = appConfig;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="absolute flex h-full w-full items-center justify-center text-white">
|
<div className="absolute flex h-full w-full items-center justify-center text-white">
|
||||||
<div>
|
<div>
|
||||||
<h4>
|
<h4>
|
||||||
One or more of the requested studies are not available at this time. Return to the{' '}
|
One or more of the requested studies are not available at this time.
|
||||||
<Link
|
|
||||||
className="text-primary-light"
|
|
||||||
to={'/'}
|
|
||||||
>
|
|
||||||
study list
|
|
||||||
</Link>{' '}
|
|
||||||
to select a different study to view.
|
|
||||||
</h4>
|
</h4>
|
||||||
|
{showStudyList && (
|
||||||
|
<p className="mt-2">
|
||||||
|
Return to the <Link className="text-primary-light" to="/">study list</Link> to select a different study to view.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user