summaryrefslogtreecommitdiff
path: root/examples/blog/src/components/PostPreview.astro
diff options
context:
space:
mode:
Diffstat (limited to 'examples/blog/src/components/PostPreview.astro')
-rw-r--r--examples/blog/src/components/PostPreview.astro7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/blog/src/components/PostPreview.astro b/examples/blog/src/components/PostPreview.astro
index d02a23fe6..b126ca2fb 100644
--- a/examples/blog/src/components/PostPreview.astro
+++ b/examples/blog/src/components/PostPreview.astro
@@ -1,6 +1,9 @@
---
-export let post;
-export let author;
+export interface Props {
+ post: any;
+ author: string;
+}
+const { post, author } = Astro.props;
function formatDate(date) {
return new Date(date).toUTCString().replace(/(\d\d\d\d) .*/, '$1'); // remove everything after YYYY