Change header based on page

This commit is contained in:
Tanner Collin 2022-06-30 00:00:30 +00:00
parent 04cd56daa8
commit 307e8349f3
4 changed files with 18 additions and 3 deletions

View File

@ -56,7 +56,21 @@ class App extends React.Component {
<Router>
<div className='container menu'>
<p>
<Link to='/'>QotNews - Feed</Link>
<Switch>
<Route path='/' exact>
<Link to='/'>QotNews - Feed</Link>
</Route>
<Route path='/search'>
<Link to='/'>QotNews - Search</Link>
</Route>
<Route path='/:id' exact>
<Link to='/'>QotNews - Article</Link>
</Route>
<Route path='/:id/c'>
<Link to='/'>QotNews - Comments</Link>
</Route>
</Switch>
<span className='theme'>Theme: <a href='#' onClick={() => this.light()}>Light</a> - <a href='#' onClick={() => this.dark()}>Dark</a></span>
<br />
<span className='slogan'>Hacker News, Reddit, Lobsters, and Tildes articles rendered in reader mode.</span>

View File

@ -68,7 +68,7 @@ class Article extends React.Component {
<div className='article'>
<Helmet>
<title>{story.title} - QotNews</title>
<meta name="robots" content="noindex">
<meta name="robots" content="noindex" />
</Helmet>
<h1>{story.title}</h1>

View File

@ -116,6 +116,7 @@ class Article extends React.Component {
<div className='article'>
<Helmet>
<title>{story.title} - QotNews Comments</title>
<meta name="robots" content="noindex" />
</Helmet>
<h1>{story.title}</h1>

View File

@ -53,7 +53,7 @@ class Feed extends React.Component {
<div className='container'>
<Helmet>
<title>Feed - QotNews</title>
<meta name="robots" content="index">
<meta name="robots" content="index" />
</Helmet>
{error && <p>Connection error?</p>}
{stories ?