chore: format files with prettier

This commit is contained in:
Sat Naing
2022-10-16 23:53:16 +06:30
parent 1cf0efe188
commit 20822c422a
11 changed files with 55 additions and 53 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ const sortedPosts = getSortedPosts(posts);
</p>
<div class="social-wrapper">
<div class="social-links">Social Links:</div>
<Socials />
<Socials />
</div>
</section>
+2 -2
View File
@@ -30,7 +30,7 @@ type PagePaths = {
export async function getStaticPaths() {
const posts = await Astro.glob<Frontmatter>("../../contents/**/*.md");
let postResult: PostResult = posts.map((post) => {
let postResult: PostResult = posts.map(post => {
return {
params: {
slug: slugify(post.frontmatter),
@@ -41,7 +41,7 @@ export async function getStaticPaths() {
};
});
const pagePaths: PagePaths = getPageNumbers(posts.length).map((pageNum) => ({
const pagePaths: PagePaths = getPageNumbers(posts.length).map(pageNum => ({
params: { slug: String(pageNum) },
}));
+2 -2
View File
@@ -13,10 +13,10 @@ const posts = await Astro.glob<Frontmatter>("../contents/**/*.md");
// List of items to search in
const searchList = posts
.filter(({ frontmatter }) => !frontmatter.draft)
.map((post) => ({
.map(post => ({
title: post.frontmatter.title,
description: post.frontmatter.description,
headings: post.getHeadings().map((h) => h.text),
headings: post.getHeadings().map(h => h.text),
frontmatter: post.frontmatter,
}));
---
+1 -1
View File
@@ -23,7 +23,7 @@ export async function getStaticPaths() {
const tags = getUniqueTags(posts);
return tags.map((tag) => {
return tags.map(tag => {
return {
params: {
tag,
+1 -1
View File
@@ -17,7 +17,7 @@ let tags = getUniqueTags(posts);
<Header activeNav="tags" />
<Main pageTitle="Tags" pageDesc="All the tags used in posts.">
<ul>
{tags.map((tag) => <Tag name={tag} size="lg" />)}
{tags.map(tag => <Tag name={tag} size="lg" />)}
</ul>
</Main>
<Footer />