webapp/src/pages/allAuthors.page.server.ts
Untone 3d18410763
All checks were successful
deploy / test (push) Successful in 1m9s
inbox-authors-preload-2
2023-12-27 02:28:26 +03:00

17 lines
397 B
TypeScript

import type { PageProps } from './types'
import type { PageContext } from '../renderer/types'
import { apiClient } from '../graphql/client/core'
export const onBeforeRender = async (_pageContext: PageContext) => {
const allAuthors = await apiClient.getAllAuthors()
const pageProps: PageProps = { allAuthors, seo: { title: '' } }
return {
pageContext: {
pageProps,
},
}
}