Skip to content

Commit

Permalink
chore: cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
SapphicMoe committed Jan 18, 2025
1 parent d952c94 commit 206f3a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/layouts/ArticleList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import BlogCard from '$components/blog/Card.astro';
import { Icon } from 'astro-icon/components';
import { type CollectionEntry, render, getEntry } from 'astro:content';
interface Props {
filterTag?: string | number;
tag?: string | number;
articles: CollectionEntry<'articles'>[];
}
const { filterTag, articles } = Astro.props;
const { tag, articles } = Astro.props;
---

<Layout
Expand All @@ -23,11 +23,11 @@ const { filterTag, articles } = Astro.props;
<p>A personal blog, comprising of whatever stuff we feel like rambling about.</p>

{
filterTag && (
tag && (
<div class="flex flex-row flex-wrap gap-x-1">
<Icon size={25} name="mdi:filter-cog" aria-hidden={true} />
<span>
Showing <span class="font-bold">{filterTag}</span> articles.
Showing <span class="font-bold">{tag}</span> articles.
</span>
<a href="/articles">[Close]</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/articles/tags/[tag]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Props {
}
const { page } = Astro.props;
const { tag: filterTag } = Astro.params;
const { tag } = Astro.params;
const articles = page.data.map((p) => p.props);
Expand Down Expand Up @@ -47,6 +47,6 @@ export const getStaticPaths: GetStaticPaths = async ({ paginate }: GetStaticPath
};
---

<ArticleList {filterTag} {articles}>
<ArticleList {tag} {articles}>
<Pagination {page} />
</ArticleList>

0 comments on commit 206f3a2

Please sign in to comment.