back to article list + read only when time is known

This commit is contained in:
2022-10-11 19:45:43 +02:00
parent 1c137af313
commit bc03788355
9 changed files with 19 additions and 43 deletions

View File

@@ -42,7 +42,7 @@ const Feed: React.FC<Props> = ({ edges }: Props) => (
</h2>
<p className={styles.description}>{edge.node.frontmatter.description}</p>
<Link className={styles.more} to={edge.node.fields.slug}>
Read ({edge.node.fields.readingTime?.text})
{edge.node.fields.readingTime?.text && <>Read ({edge.node.fields.readingTime?.text})</>}
</Link>
</div>
))}

View File

@@ -30,10 +30,7 @@ exports[`Feed renders correctly 1`] = `
</p>
<a
href="/posts/perfecting-the-art-of-perfection"
>
Read (
)
</a>
/>
</div>
<div>
<div>
@@ -63,10 +60,7 @@ exports[`Feed renders correctly 1`] = `
</p>
<a
href="/posts/the-birth-of-movable-type"
>
Read (
)
</a>
/>
</div>
</div>
`;