strict typescript
This commit is contained in:
@@ -15,8 +15,6 @@ const { title, date, slug } = Astro.props;
|
||||
{slug ? <a href={`/posts/${slug}`}>{title}</a> : title}
|
||||
</h2>
|
||||
<h3>
|
||||
<!-- <img class="svg-icon" src={calendarIcon} alt="" /> -->
|
||||
|
||||
🗓️ <FormattedDate date={date} />
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import { Tag } from 'src/content/config';
|
||||
|
||||
import BlogHeader from '@components/BlogHeader.astro';
|
||||
import Tags from '@components/Tags.astro';
|
||||
|
||||
@@ -6,7 +8,7 @@ interface Post {
|
||||
data: {
|
||||
title: string;
|
||||
pubDate: Date;
|
||||
tags: string[];
|
||||
tags: Tag[];
|
||||
};
|
||||
slug: string;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
import { Tag } from 'src/content/config';
|
||||
|
||||
interface Props {
|
||||
tags: string[];
|
||||
tags: Tag[];
|
||||
}
|
||||
|
||||
const { tags } = Astro.props;
|
||||
@@ -8,7 +10,7 @@ const { tags } = Astro.props;
|
||||
|
||||
<div class="tag-container">
|
||||
{
|
||||
tags.sort().map((tag: string) => (
|
||||
tags.sort().map((tag: Tag) => (
|
||||
<a class="tag" href={`/archive/${tag}?page=1`}>
|
||||
#{tag}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user