diff --git a/src/components/MediumBlogsDynamic/index.tsx b/src/components/MediumBlogsDynamic/index.tsx index 5bc0147..6879317 100644 --- a/src/components/MediumBlogsDynamic/index.tsx +++ b/src/components/MediumBlogsDynamic/index.tsx @@ -16,7 +16,7 @@ export default function MediumBlogsDynamic(props: Props) { <>

Published Blogs

- setFilter(e.currentTarget.value)} /> + setFilter(e.currentTarget.value)} />
{ filteredBlogs().map(post => ) diff --git a/src/pages/blogs.astro b/src/pages/blogs.astro index 136dd4e..fc54e63 100644 --- a/src/pages/blogs.astro +++ b/src/pages/blogs.astro @@ -1,8 +1,6 @@ --- -import Layout from '@/layouts/Layout.astro' -import { Image } from 'astro:assets' -import GorillaWriting from '@/images/gorilla-writing.jpg' import MediumBlogs from '@/components/MediumBlogs.astro' +import Layout from '@/layouts/Layout.astro' --- @@ -18,6 +16,12 @@ import MediumBlogs from '@/components/MediumBlogs.astro'

+

+ Don't let your FOMO get the best of you! Follow me on Medium and never miss an entry. +

+
diff --git a/src/store/blogs.ts b/src/store/blogs.ts index aa83b20..de02c92 100644 --- a/src/store/blogs.ts +++ b/src/store/blogs.ts @@ -2,6 +2,7 @@ import rss from 'rss-to-json' //@ts-ignore const { parse } = rss +// import { parse } from 'rss-to-json' import dayjs from 'dayjs' import { sort } from 'fast-sort' const paragraph = /]*>(.*?)<\/p>/i @@ -9,7 +10,7 @@ const imageUrl = /]+src="([^">]+)"/i export async function fetchBlogPosts(): Promise { const rssJson = await parse('https://medium.com/feed/@shadetreeit') - const posts: BlogPost[] = rssJson.items.map(item => { + const posts: BlogPost[] = rssJson.items.map((item: any) => { const firstParagraph = item.content.match(paragraph)?.[1] return { title: item.title, diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 3b1355b..39ff40d 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -1,4 +1,3 @@ - type BlogPost = { title: string link: string