Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
no posts message on index
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyspiro committed Jun 25, 2019
1 parent f4d9161 commit f2c92b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions pages/index.js
Expand Up @@ -40,6 +40,10 @@ export default class extends React.Component {
<div>
<Header cosmic={ this.props.cosmic }/>
<main className="container">
{
!this.props.cosmic.posts &&
'You must add at least one Post to your Bucket'
}
{
this.props.cosmic.posts &&
this.props.cosmic.posts.map(post => {
Expand Down
6 changes: 0 additions & 6 deletions pages/partials/header.js
Expand Up @@ -15,12 +15,6 @@ export default class extends React.Component {
<a href="/">{ this.props.cosmic.global.header.metadata.site_title }</a>
<small className="site-title__tag">{ this.props.cosmic.global.header.metadata.site_tag }</small>
</h1>
<div>
{
!this.props.cosmic.posts &&
'You must add at least one Post to your Bucket'
}
</div>
</header>
]
}
Expand Down

0 comments on commit f2c92b2

Please sign in to comment.