fix issue #2130 - With config.showStudyList : false -> Still showing hyperlink to StudyList on Not Found Component
This commit is contained in:
parent
7eb8c4c641
commit
5b302843d4
@ -1,13 +1,17 @@
|
||||
import React from 'react';
|
||||
import './NotFound.css';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useAppContext } from '../context/AppContext';
|
||||
|
||||
export default function NotFound({ message = 'Sorry, this page does not exist.', showGoBackButton = true }) {
|
||||
|
||||
const context = useAppContext();
|
||||
|
||||
return (
|
||||
<div className={'not-found'}>
|
||||
<div>
|
||||
<h4>{message}</h4>
|
||||
{showGoBackButton && (
|
||||
{showGoBackButton && context.appConfig.showStudyList && (
|
||||
<h5>
|
||||
<Link to={'/'}>Go back to the Study List</Link>
|
||||
</h5>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user