Skip to content

Commit

Permalink
fix: fixes rendering of "Last updated/time to read" in doc pages
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Feb 8, 2021
1 parent afa804b commit 9277b65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/docs/header/contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PropTypes } from "prop-types"

const ContributorsBlock = ({ contributors }) => {
return (
<div className="flex">
<div className="flex mt-3">
{contributors.map(e => (
<a
key={e.login}
Expand Down
15 changes: 8 additions & 7 deletions src/components/docs/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ const DocsHeader = ({ title, timeToRead, contributors, commits }) => {
return (
<div id="docs-header" className="content mt-20 xl:mt-16 mb-8">
<h1 style={{ marginBottom: "5px" }}>{title}</h1>
<div className="flex italic" style={{ marginBottom: "15px" }}>
<span className="italic">
{latestCommit && (
<span>
<>
{" "}
Last updated: {moment(latestCommitDate).fromNow()} (
<Link to="#page-history">view history</Link>)
</span>
</>
)}
<span>
{latestCommit && <span>{`, `}</span>} Time to read: {timeToRead} mins
</span>
</div>
<>
{latestCommit && <>{`, `}</>} Time to read: {timeToRead} mins
</>
</span>
{contributors && <ContributorsBlock contributors={contributors} />}
</div>
)
Expand Down

1 comment on commit 9277b65

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.