From 6395e4e00b57b70999d167f7e7088b3a0b34ef9b Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 8 Mar 2020 10:28:04 +0100 Subject: [PATCH] Improved NotFount component so that link text is passed as children --- src/common/MenuLayout.js | 2 +- src/common/NotFound.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/MenuLayout.js b/src/common/MenuLayout.js index 592a6b9c..6b5f5057 100644 --- a/src/common/MenuLayout.js +++ b/src/common/MenuLayout.js @@ -79,7 +79,7 @@ const MenuLayout = (TagsList, ShortUrls, AsideMenu, CreateShortUrl, ShortUrlVisi } + render={() => List short URLs} /> diff --git a/src/common/NotFound.js b/src/common/NotFound.js index d34e0143..7a2355e9 100644 --- a/src/common/NotFound.js +++ b/src/common/NotFound.js @@ -4,17 +4,18 @@ import * as PropTypes from 'prop-types'; const propTypes = { to: PropTypes.string, - btnText: PropTypes.string, + children: PropTypes.node, }; -const NotFound = ({ to = '/', btnText = 'Home' }) => ( +const NotFound = ({ to = '/', children = 'Home' }) => (

Oops! We could not find requested route.

- Use your browser{'\''}s back button to navigate to the page you have previously come from, or just press this button. + Use your browser's back button to navigate to the page you have previously come from, or just press this + button.


- {btnText} + {children}
);