feat(errorHandling): Create fallback page for Server, Study and Series (#3592)
This commit is contained in:
1 parent
9c51f17c60
commit
19408c987f
6 files changed
+100
-1
No files matched your search
@@ -10,9 +10,56 @@ import Debug from './Debug';
|
||||
import NotFound from './NotFound';
|
||||
import buildModeRoutes from './buildModeRoutes';
|
||||
import PrivateRoute from './PrivateRoute';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const NotFoundServer = ({
|
||||
message = 'Unable to query for studies at this time. Check your data source configuration or network connection',
|
||||
}) => {
|
||||
return (
|
||||
<div className="absolute w-full h-full flex justify-center items-center text-white">
|
||||
<div>
|
||||
<h4>{message}</h4>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
NotFoundServer.propTypes = {
|
||||
message: PropTypes.string,
|
||||
};
|
||||
|
||||
const NotFoundStudy = () => {
|
||||
return (
|
||||
<div className="absolute w-full h-full flex justify-center items-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.
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
NotFoundStudy.propTypes = {
|
||||
message: PropTypes.string,
|
||||
};
|
||||
|
||||
// TODO: Include "routes" debug route if dev build
|
||||
const bakedInRoutes = [
|
||||
{
|
||||
path: '/notfoundserver',
|
||||
children: NotFoundServer,
|
||||
},
|
||||
{
|
||||
path: '/notfoundstudy',
|
||||
children: NotFoundStudy,
|
||||
},
|
||||
{
|
||||
path: '/debug',
|
||||
children: Debug,
|
||||
|
||||
Reference in new issue
Block a user