fix: remove 0 from header of posts, remove test data

This commit is contained in:
Corbin Crutchley
2022-06-09 08:04:46 -07:00
parent 5a7b6ab9a7
commit 1f0282b0a7
4 changed files with 5 additions and 33 deletions

View File

@@ -1,14 +0,0 @@
---
{
title: "Testing",
description: "A Regular Expression or regex for short is a syntax that allows you to match strings with specific patterns. Think of it as a suped-up text search",
published: "2022-04-17T22:12:03.284Z",
authors: ["crutchcorn"],
tags: ["regex", "computer science"],
attached: [],
license: "coderpad",
originalLink: "https://coderpad.io/blog/development/the-complete-guide-to-regular-expressions-regex/",
}
---
This is a test

View File

@@ -1,14 +0,0 @@
---
{
title: "Testing",
description: "A Regular Expression or regex for short is a syntax that allows you to match strings with specific patterns. Think of it as a suped-up text search",
published: "2022-04-17T22:12:03.284Z",
authors: ["crutchcorn"],
tags: ["regex", "computer science"],
attached: [],
license: "coderpad",
originalLink: "https://coderpad.io/blog/development/the-complete-guide-to-regular-expressions-regex/",
}
---
This is a test

View File

@@ -19,7 +19,7 @@ export const TranslationsHeader = ({ post }: TranslationsHeaderProps) => {
<Link passHref href={`/${langHref}posts/${post.slug}`}>
<a>{post.translations[lang]}</a>
</Link>
{i !== arr.length - 1 && <span>, </span>}
{i !== arr.length - 1 ? <span>, </span> : null}
</Fragment>
);
})}

View File

@@ -140,16 +140,16 @@ const Post = ({
<PostMetadata post={post} />
</header>
<main className="post-body" data-testid={"post-body-div"}>
{post.series && (
{post.series ? (
<SeriesToC
post={post}
postSeries={seriesPosts}
collectionSlug={post.collectionSlug}
/>
)}
{post.translations && Object.keys(post.translations).length && (
) : null}
{post.translations && Object.keys(post.translations).length ? (
<TranslationsHeader post={post} />
)}
) : null}
{result}
</main>
</>