webapp/src/pages/feed/index.astro

14 lines
444 B
Plaintext
Raw Normal View History

2022-09-09 11:53:35 +00:00
---
import { FeedPage } from '../../components/Views/Feed'
import Zine from '../../layouts/zine.astro'
import { apiClient } from '../../utils/apiClient'
2022-09-13 09:59:04 +00:00
const recentArticles = await apiClient.getRecentArticles({ page: 1 })
2022-09-09 11:53:35 +00:00
const shoutSlugs = recentArticles.map((s) => s.slug)
const reactions = await apiClient.getReactionsForShouts({ shoutSlugs })
---
<Zine>
2022-09-13 09:59:04 +00:00
<FeedPage articles={recentArticles} reactions={reactions} client:load />
2022-09-09 11:53:35 +00:00
</Zine>