webapp/src/pages/allTopics.page.server.ts

17 lines
394 B
TypeScript
Raw Normal View History

2023-02-17 09:21:02 +00:00
import type { PageContext } from '../renderer/types'
2024-02-04 11:25:21 +00:00
import type { PageProps } from './types'
2023-11-28 13:18:25 +00:00
import { apiClient } from '../graphql/client/core'
2023-02-17 09:21:02 +00:00
export const onBeforeRender = async (_pageContext: PageContext) => {
const allTopics = await apiClient.getAllTopics()
const pageProps: PageProps = { allTopics, seo: { title: '' } }
2023-02-17 09:21:02 +00:00
return {
pageContext: {
pageProps,
},
2023-02-17 09:21:02 +00:00
}
}