server-lodaing-fix
Some checks failed
deploy / test (push) Successful in 1m11s
deploy / Update templates on Mailgun (push) Failing after 5s

This commit is contained in:
Untone 2024-01-11 10:02:36 +03:00
parent 336405c2e2
commit 417f2c6678

View File

@ -1,12 +1,16 @@
import type { PageProps } from './types' import type { PageProps } from './types'
import type { PageContext } from '../renderer/types' import type { PageContext } from '../renderer/types'
import { PRERENDERED_ARTICLES_COUNT } from '../components/Views/Home'
import { apiClient } from '../graphql/client/core' import { apiClient } from '../graphql/client/core'
export const onBeforeRender = async (_pageContext: PageContext) => { export const onBeforeRender = async (_pageContext: PageContext) => {
const allAuthors = await apiClient.getAllAuthors() const homeShouts = await apiClient.getShouts({
filters: { published: true },
limit: PRERENDERED_ARTICLES_COUNT,
})
const pageProps: PageProps = { allAuthors, seo: { title: '' } } const pageProps: PageProps = { homeShouts, seo: { title: '' } }
return { return {
pageContext: { pageContext: {