quotes

My favourite quotes. (gatsbyjs)
git clone http://git.hanabi.in/repos/quotes.git
Log | Files | Refs | README | LICENSE

commit be15f590cb0fbbdd3e42a337b1649c2466a9cacf
parent 64312ae7da749f4216c63145ebc808b794ccb5eb
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Wed, 11 Mar 2020 20:03:47 +0530

random page should be clickable and when selected, it should be bold

Diffstat:
Msrc/components/header.js | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/components/header.js b/src/components/header.js @@ -30,7 +30,7 @@ function Header({ description, link = '/', showHeader, siteTitle, slug }) { </li> <li> {slug == 'random' ? ( - <BoldEntry text="Random" /> + <BoldLinkEntry text="Random" path="/random" /> ) : ( <Link to="/random">Random</Link> )} @@ -65,4 +65,12 @@ function BoldEntry({ text = '' }) { return <span style={{ fontWeight: 700, cursor: 'default' }}>{text}</span>; } +function BoldLinkEntry({ text = '', path = '/' }) { + return ( + <span style={{ fontWeight: 700, cursor: 'default' }}> + <Link to={path}>{text}</Link> + </span> + ); +} + export default Header;