fix: Add support for showStudyList configuration setting (#3009)
I followed suit with how it was implemented in the v2 branch, on the 404 page I just hit the link back to the study list if we're not configured to display it. See PR #2131
This commit is contained in:
4 files changed
+23
-8
No files matched your search
@@ -2,15 +2,20 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { useAppConfig } from '@state';
|
||||
|
||||
const NotFound = ({
|
||||
message = 'Sorry, this page does not exist.',
|
||||
showGoBackButton = true,
|
||||
}) => {
|
||||
const [appConfig] = useAppConfig();
|
||||
const { showStudyList } = appConfig;
|
||||
|
||||
return (
|
||||
<div className="w-full h-full flex justify-center items-center text-white">
|
||||
<div>
|
||||
<h4>{message}</h4>
|
||||
{showGoBackButton && (
|
||||
{showGoBackButton && showStudyList && (
|
||||
<h5>
|
||||
<Link to={'/'}>Go back to the Study List</Link>
|
||||
</h5>
|
||||
|
||||
Reference in new issue
Block a user