21 lines
719 B
Plaintext
21 lines
719 B
Plaintext
---
|
|
import { Root } from '../../../components/Root'
|
|
import Zine from '../../../main.astro'
|
|
import { apiClient } from '../../../utils/apiClient'
|
|
import { initRouter } from '../../../stores/router'
|
|
import { PRERENDERED_ARTICLES_COUNT } from '../../../components/Views/Author'
|
|
|
|
const slug = Astro.params.slug.toString()
|
|
const shouts = await apiClient.getArticlesForAuthors({ authorSlugs: [slug], limit: PRERENDERED_ARTICLES_COUNT })
|
|
const author = shouts[0].authors.find((a) => a.slug === slug)
|
|
|
|
const { pathname, search } = Astro.url
|
|
initRouter(pathname, search)
|
|
|
|
Astro.response.headers.set('Cache-Control', 's-maxage=1, stale-while-revalidate')
|
|
---
|
|
|
|
<Zine>
|
|
<Root shouts={shouts} author={author} client:load />
|
|
</Zine>
|