Skip to content

Commit 6e6cf3a

Browse files
committed
feat: add type safety for getStaticProps
1 parent c907e95 commit 6e6cf3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pages/[pageId].tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import * as React from 'react'
2+
import { GetStaticProps } from 'next'
23
import { isDev, domain } from 'lib/config'
34
import { getSiteMap } from 'lib/get-site-map'
45
import { resolveNotionPage } from 'lib/resolve-notion-page'
6+
import { PageProps, Params } from 'lib/types'
57
import { NotionPage } from 'components'
68

7-
export const getStaticProps = async (context) => {
9+
export const getStaticProps: GetStaticProps<PageProps, Params> = async (context) => {
810
const rawPageId = context.params.pageId as string
911

1012
try {

0 commit comments

Comments
 (0)