feat: add type safety for getStaticProps

This commit is contained in:
Trang Le
2022-06-27 10:58:19 +00:00
parent c907e95b00
commit 6e6cf3a88a

View File

@@ -1,10 +1,12 @@
import * as React from 'react'
import { GetStaticProps } from 'next'
import { isDev, domain } from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import { resolveNotionPage } from 'lib/resolve-notion-page'
import { PageProps, Params } from 'lib/types'
import { NotionPage } from 'components'
export const getStaticProps = async (context) => {
export const getStaticProps: GetStaticProps<PageProps, Params> = async (context) => {
const rawPageId = context.params.pageId as string
try {