forked from tanner/qotnews
fix empty source links.
This commit is contained in:
parent
a86eb98c1a
commit
a2e5faa3b5
|
@ -16,12 +16,11 @@ export const sourceLink = (story) => {
|
||||||
export const infoLine = (story) => (
|
export const infoLine = (story) => (
|
||||||
<div className="info">
|
<div className="info">
|
||||||
{story.score} points by <a href={story.author_link}>{story.author}</a>
|
{story.score} points by <a href={story.author_link}>{story.author}</a>
|
||||||
​ {moment.unix(story.date).fromNow()}
|
​ {moment.unix(story.date).fromNow()}
|
||||||
​ on <a href={story.link}>{story.source}</a> | ​
|
​ on {story.link ? <a href={story.link}>{story.source}</a> : story.source}
|
||||||
<Link
|
| ​ <Link
|
||||||
className={story.num_comments > 99 ? "hot" : ""}
|
className={story.num_comments > 99 ? "hot" : ""}
|
||||||
to={"/" + story.id + "/c"}
|
to={"/" + story.id + "/c"}>
|
||||||
>
|
|
||||||
{story.num_comments} comment{story.num_comments !== 1 && "s"}
|
{story.num_comments} comment{story.num_comments !== 1 && "s"}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user