Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Whoops. Add missing files to fix failing build for 8834b9c
Browse files Browse the repository at this point in the history
  • Loading branch information
cbillowes committed Feb 13, 2019
1 parent 8834b9c commit 8fba7e4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
37 changes: 29 additions & 8 deletions src/components/Metadata/Post/Metadata.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,33 @@ class Metadata extends Component {
}
}

renderDate = (date, calendarStrings) => {
if (date) {
return (
<span>
posted
{" "}
<Moment className="moment" date={date} calendar={calendarStrings} />
{" "}
on
{" "}
<span className="date">{this.renderMoment(date)}</span>
</span>
)
}
return (<span />)
}

renderTimeToRead = (timeToRead) => {
if (timeToRead) {
return (
<span>
{<span className="timeToRead">timeToRead</span> && <span>(Est. {timeToRead} minute read)</span>}
</span>
)
}
}

render() {
const { tags, date, timeToRead } = this.props
moment.updateLocale("en")
Expand All @@ -38,17 +65,11 @@ class Metadata extends Component {
return (
<div className="post-metadata">
<p>
posted
{" "}
<Moment className="moment" date={theDate} calendar={calendarStrings} />
{" "}
on
{" "}
<span className="date">{this.renderMoment(theDate)}</span>
{this.renderDate(theDate, calendarStrings)}
{" "}
by Clarice Bouwer
{" "}
{<span className="timeToRead">timeToRead</span> && <span>(Est. {timeToRead} minute read)</span>}
{this.renderTimeToRead(timeToRead)}
</p>
{(tags) ? <Tags className="tags" tags={tags} /> : <span />}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PostNavigation/Elaborate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "./Elaborate.scss"

const Item = ({ post }) => (
<aside className="post" style={{ backgroundImage: (post.cover) ? `url(${post.cover})` : "" }}>
<div class="overlay"></div>
<div className="overlay"></div>
<div className="container">
<h1>{post.title}</h1>
<p dangerouslySetInnerHTML={{ __html: post.excerpt }} />
Expand Down

0 comments on commit 8fba7e4

Please sign in to comment.