fix(NotFoundStudy): Fixed the viewer not-found page when showStudyList: false (#5035)

This commit is contained in:
Dan 2025-05-12 16:35:33 +03:00 committed by GitHub
parent f4ba9b3cc6
commit 950453fd70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@ import buildModeRoutes from './buildModeRoutes';
import PrivateRoute from './PrivateRoute';
import PropTypes from 'prop-types';
import { routerBase, routerBasename } from '../utils/publicUrl';
import { useAppConfig } from '@state';
const NotFoundServer = ({
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 [appConfig] = useAppConfig();
const { showStudyList } = appConfig;
return (
<div className="absolute flex h-full w-full items-center justify-center text-white">
<div>
<h4>
One or more of the requested studies are not available at this time. Return to the{' '}
<Link
className="text-primary-light"
to={'/'}
>
study list
</Link>{' '}
to select a different study to view.
One or more of the requested studies are not available at this time.
</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>
);