webapp/src/pages/allAuthors.page.server.ts
2024-02-04 14:25:21 +03:00

17 lines
397 B
TypeScript

import type { PageContext } from '../renderer/types'
import type { PageProps } from './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,
},
}
}